1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-18 03:06:17 +02:00

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>
This commit is contained in:
Brian Gesiak 2014-05-27 00:33:53 +09:00 committed by Junio C Hamano
parent 65bbf082c2
commit 48d547fb38

View File

@ -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;