Merge branch 'rs/realloc-array'
Code cleanup. * rs/realloc-array: use REALLOC_ARRAY for changing the allocation size of arrays add macro REALLOC_ARRAY
This commit is contained in:
@ -1440,7 +1440,7 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
|
||||
continue;
|
||||
|
||||
nr++;
|
||||
list = xrealloc(list, nr * sizeof(list[0]));
|
||||
REALLOC_ARRAY(list, nr);
|
||||
list[nr - 1] = commit;
|
||||
}
|
||||
if (nr == 0)
|
||||
|
Reference in New Issue
Block a user