Skip to content

Commit 48d547f

Browse files
modocachegitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 65bbf08 commit 48d547f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pack-revindex.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ static void init_pack_revindex(void)
4545
if (!num)
4646
return;
4747
pack_revindex_hashsz = num * 11;
48-
pack_revindex = xcalloc(sizeof(*pack_revindex), pack_revindex_hashsz);
48+
pack_revindex = xcalloc(pack_revindex_hashsz, sizeof(*pack_revindex));
4949
for (p = packed_git; p; p = p->next) {
5050
num = pack_revindex_ix(p);
5151
num = - 1 - num;

0 commit comments

Comments
 (0)