summaryrefslogtreecommitdiff
path: root/remote.c
diff options
context:
space:
mode:
authorBrian Gesiak <modocache@gmail.com>2014-05-27 00:33:55 +0900
committerJunio C Hamano <gitster@pobox.com>2014-05-27 14:02:45 -0700
commitda7a478bc055bd5fdbdf1895367c803d528cf579 (patch)
tree9e581441bed4230d630c5e96d7021242fad6f193 /remote.c
parent8e1aa2f792b78f2528157428c7932ffa9adcbea6 (diff)
downloadgit-da7a478bc055bd5fdbdf1895367c803d528cf579.tar.gz
remote.c: rearrange xcalloc arguments
xcalloc() takes two arguments: the number of elements and their size. parse_refspec_internal passes the arguments in reverse order, passing the size of a refspec, 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>
Diffstat (limited to 'remote.c')
-rw-r--r--remote.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/remote.c b/remote.c
index eea2c8de45..0e9459cc06 100644
--- a/remote.c
+++ b/remote.c
@@ -523,7 +523,7 @@ static void free_refspecs(struct refspec *refspec, int nr_refspec)
static struct refspec *parse_refspec_internal(int nr_refspec, const char **refspec, int fetch, int verify)
{
int i;
- struct refspec *rs = xcalloc(sizeof(*rs), nr_refspec);
+ struct refspec *rs = xcalloc(nr_refspec, sizeof(*rs));
for (i = 0; i < nr_refspec; i++) {
size_t llen;