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
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