diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-10-18 14:19:13 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-10-18 14:19:13 +0900 |
commit | 116d1d4c8ec443261566773625d0304912385824 (patch) | |
tree | 7bc275c5691c02616fcaa37f04919ed68749e5b0 | |
parent | 073a1fd9e4005091a6f37e2a57221218a115fabd (diff) | |
parent | 0e187d758cd4ad0f929b90b04adee7ec19f7fc93 (diff) | |
download | git-116d1d4c8ec443261566773625d0304912385824.tar.gz |
Merge branch 'rs/run-command-use-alloc-array' into maint
Code clean-up.
* rs/run-command-use-alloc-array:
run-command: use ALLOC_ARRAY
-rw-r--r-- | run-command.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/run-command.c b/run-command.c index b5e6eb37c0..014b2165b5 100644 --- a/run-command.c +++ b/run-command.c @@ -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; |