Skip to content

Commit f3d51ff

Browse files
modocachegitster
authored andcommitted
http-push.c: rearrange xcalloc arguments
xcalloc() takes two arguments: the number of elements and their size. http-push passes the arguments in reverse order, passing the size of a repo, followed by the number to allocate. Rearrange them so they are in the correct order. Signed-off-by: Brian Gesiak <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 1a4927c commit f3d51ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

http-push.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1732,7 +1732,7 @@ int main(int argc, char **argv)
17321732

17331733
git_extract_argv0_path(argv[0]);
17341734

1735-
repo = xcalloc(sizeof(*repo), 1);
1735+
repo = xcalloc(1, sizeof(*repo));
17361736

17371737
argv++;
17381738
for (i = 1; i < argc; i++, argv++) {

0 commit comments

Comments
 (0)