http-push.c: rearrange xcalloc arguments
authorBrian Gesiak <modocache@gmail.com>
Mon, 26 May 2014 15:33:50 +0000 (00:33 +0900)
committerJunio C Hamano <gitster@pobox.com>
Tue, 27 May 2014 21:02:45 +0000 (14:02 -0700)
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>
http-push.c
index f2c56c84544be36414686ed2e27c8b08e8946e53..de00d1693af902713ab5562e9d87fe621b02f955 100644 (file)
@@ -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++) {