1
0
mirror of https://github.com/git/git.git synced 2024-09-26 06:51:15 +02:00

Merge branch 'rs/run-command-use-alloc-array'

Code clean-up.

* rs/run-command-use-alloc-array:
  run-command: use ALLOC_ARRAY
This commit is contained in:
Junio C Hamano 2017-10-05 13:48:20 +09:00
commit d5d5295e0a

View File

@ -452,7 +452,7 @@ static char **prep_childenv(const char *const *deltaenv)
}
/* Create an array of 'char *' to be used as the childenv */
childenv = xmalloc((env.nr + 1) * sizeof(char *));
ALLOC_ARRAY(childenv, env.nr + 1);
for (i = 0; i < env.nr; i++)
childenv[i] = env.items[i].util;
childenv[env.nr] = NULL;