summaryrefslogtreecommitdiff
path: root/pack-revindex.c
diff options
context:
space:
mode:
authorBrian Gesiak <modocache@gmail.com>2014-05-26 15:33:53 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-05-27 21:02:45 (GMT)
commit48d547fb381b311fd327f84f1dff11228303c872 (patch)
treed47624d279e5779bb9976dfa06fd5fb761bfe931 /pack-revindex.c
parent65bbf082c27bcc4544511b642fb311e5f3c21722 (diff)
downloadgit-48d547fb381b311fd327f84f1dff11228303c872.zip
git-48d547fb381b311fd327f84f1dff11228303c872.tar.gz
git-48d547fb381b311fd327f84f1dff11228303c872.tar.bz2
pack-revindex.c: rearrange xcalloc arguments
xcalloc() takes two arguments: the number of elements and their size. init_pack_revindex() passes the arguments in reverse order, passing the size of a pack_revindex, 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 'pack-revindex.c')
-rw-r--r--pack-revindex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pack-revindex.c b/pack-revindex.c
index 5bd7c61..5c8376e 100644
--- a/pack-revindex.c
+++ b/pack-revindex.c
@@ -45,7 +45,7 @@ static void init_pack_revindex(void)
if (!num)
return;
pack_revindex_hashsz = num * 11;
- pack_revindex = xcalloc(sizeof(*pack_revindex), pack_revindex_hashsz);
+ pack_revindex = xcalloc(pack_revindex_hashsz, sizeof(*pack_revindex));
for (p = packed_git; p; p = p->next) {
num = pack_revindex_ix(p);
num = - 1 - num;