use REALLOC_ARRAY for changing the allocation size of arrays
Signed-off-by: Rene Scharfe <l.s.r@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
3ac22f82ed
commit
2756ca4347
@ -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;
|
||||
|
Reference in New Issue
Block a user