hashmap: improve struct hashmap member documentation
[gitweb.git] / commit.c
index ebd7ad8465672004c56386de686d9ba7ff0eccdb..4ff8077dbfbc6cdd6c14728a3d33a78d075c236f 100644 (file)
--- a/commit.c
+++ b/commit.c
@@ -1089,7 +1089,7 @@ struct commit_list *reduce_heads(struct commit_list *heads)
                p->item->object.flags |= STALE;
                num_head++;
        }
-       array = xcalloc(sizeof(*array), num_head);
+       array = xcalloc(num_head, sizeof(*array));
        for (p = heads, i = 0; p; p = p->next) {
                if (p->item->object.flags & STALE) {
                        array[i++] = p->item;