Merge branch 'js/completion-hide-not-a-repo'
[gitweb.git] / builtin / pack-objects.c
index b59f5d895e38bdb96d19b5fc5061669facdf22cc..d39193453a6bf868f8b62dac18201b0b4b7bccbd 100644 (file)
@@ -89,8 +89,7 @@ static void index_commit_for_bitmap(struct commit *commit)
 {
        if (indexed_commits_nr >= indexed_commits_alloc) {
                indexed_commits_alloc = (indexed_commits_alloc + 32) * 2;
-               indexed_commits = xrealloc(indexed_commits,
-                       indexed_commits_alloc * sizeof(struct commit *));
+               REALLOC_ARRAY(indexed_commits, indexed_commits_alloc);
        }
 
        indexed_commits[indexed_commits_nr++] = commit;