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:
3
git.c
3
git.c
@ -282,8 +282,7 @@ static int handle_alias(int *argcp, const char ***argv)
|
||||
"trace: alias expansion: %s =>",
|
||||
alias_command);
|
||||
|
||||
new_argv = xrealloc(new_argv, sizeof(char *) *
|
||||
(count + *argcp));
|
||||
REALLOC_ARRAY(new_argv, count + *argcp);
|
||||
/* insert after command name */
|
||||
memcpy(new_argv + count, *argv + 1, sizeof(char *) * *argcp);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user