Skip to content

Commit

Permalink
http-push.c: rearrange xcalloc arguments
Browse files Browse the repository at this point in the history
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 <modocache@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Brian Gesiak authored and Junio C Hamano committed May 27, 2014
1 parent 1a4927c commit f3d51ff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion http-push.c
Original file line number Diff line number Diff line change
Expand Up @@ -1732,7 +1732,7 @@ int main(int argc, char **argv)

git_extract_argv0_path(argv[0]);

repo = xcalloc(sizeof(*repo), 1);
repo = xcalloc(1, sizeof(*repo));

argv++;
for (i = 1; i < argc; i++, argv++) {
Expand Down

0 comments on commit f3d51ff

Please sign in to comment.