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
@ -111,8 +111,7 @@ static inline void push_bitmapped_commit(struct commit *commit, struct ewah_bitm
|
||||
{
|
||||
if (writer.selected_nr >= writer.selected_alloc) {
|
||||
writer.selected_alloc = (writer.selected_alloc + 32) * 2;
|
||||
writer.selected = xrealloc(writer.selected,
|
||||
writer.selected_alloc * sizeof(struct bitmapped_commit));
|
||||
REALLOC_ARRAY(writer.selected, writer.selected_alloc);
|
||||
}
|
||||
|
||||
writer.selected[writer.selected_nr].commit = commit;
|
||||
|
Reference in New Issue
Block a user