builtin/ls-remote.c: rearrange xcalloc arguments

xcalloc() takes two arguments: the number of elements and their size. cmd_ls_remote() passes the arguments in reverse order, passing the size of a char*, followed by the number of char* to be allocated. 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>

Brian Gesiak committed May 27, 2014 at 00:33 UTC edd2d8466523094c9b14762e402b0de15d68fec0
1 file changed +1 -1
builtin/ls-remote.c
+1 -1
@@ -92,7 +92,7 @@ int cmd_ls_remote(int argc, const char **argv, const char *prefix)
92
93 if (argv[i]) {
94 int j;
95 - pattern = xcalloc(sizeof(const char *), argc - i + 1);
95 + pattern = xcalloc(argc - i + 1, sizeof(const char *));
96 for (j = i; j < argc; j++) {
97 int len = strlen(argv[j]);
98 char *p = xmalloc(len + 3);