commit.c: rearrange xcalloc arguments

xcalloc() takes two arguments: the number of elements and their size. reduce_heads() passes the arguments in reverse order, passing the size of a commit*, followed by the number of commit* 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>

Brian Gesiak committed May 27, 2014 at 00:33 UTC c4a7b0092bbe39a6b05ddd65a6b3e45565203367
1 file changed +1 -1
commit.c
+1 -1
@@ -1031,7 +1031,7 @@ struct commit_list *reduce_heads(struct commit_list *heads)
1031 p->item->object.flags |= STALE;
1032 num_head++;
1033 }
1034 - array = xcalloc(sizeof(*array), num_head);
1034 + array = xcalloc(num_head, sizeof(*array));
1035 for (p = heads, i = 0; p; p = p->next) {
1036 if (p->item->object.flags & STALE) {
1037 array[i++] = p->item;