Commit 116d1d4c authored by Junio C Hamano's avatar Junio C Hamano

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

Code clean-up.

* rs/run-command-use-alloc-array:
  run-command: use ALLOC_ARRAY
parents 073a1fd9 0e187d75
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment