From edd2d8466523094c9b14762e402b0de15d68fec0 Mon Sep 17 00:00:00 2001 From: Brian Gesiak Date: Tue, 27 May 2014 00:33:43 +0900 Subject: 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 Signed-off-by: Junio C Hamano --- builtin/ls-remote.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builtin/ls-remote.c') diff --git a/builtin/ls-remote.c b/builtin/ls-remote.c index 3e9eefb09..b2a4b9299 100644 --- a/builtin/ls-remote.c +++ b/builtin/ls-remote.c @@ -92,7 +92,7 @@ int cmd_ls_remote(int argc, const char **argv, const char *prefix) if (argv[i]) { int j; - pattern = xcalloc(sizeof(const char *), argc - i + 1); + pattern = xcalloc(argc - i + 1, sizeof(const char *)); for (j = i; j < argc; j++) { int len = strlen(argv[j]); char *p = xmalloc(len + 3); -- cgit v1.2.1