summaryrefslogtreecommitdiff
path: root/builtin/ls-remote.c
diff options
context:
space:
mode:
authorBrian Gesiak <modocache@gmail.com>2014-05-26 15:33:43 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-05-27 21:00:43 (GMT)
commitedd2d8466523094c9b14762e402b0de15d68fec0 (patch)
tree64086bbfd942a008185ca6828f91f63d4756c715 /builtin/ls-remote.c
parent4a28f169ad29ba452e0e7bea2583914c10c58322 (diff)
downloadgit-edd2d8466523094c9b14762e402b0de15d68fec0.zip
git-edd2d8466523094c9b14762e402b0de15d68fec0.tar.gz
git-edd2d8466523094c9b14762e402b0de15d68fec0.tar.bz2
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>
Diffstat (limited to 'builtin/ls-remote.c')
-rw-r--r--builtin/ls-remote.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/ls-remote.c b/builtin/ls-remote.c
index 3e9eefb..b2a4b92 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);