diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-10-05 07:48:20 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-10-05 07:48:20 +0300 |
commit | d5d5295e0ad3a05b85f36462be5835a40b2fb75c (patch) | |
tree | 0f9a0bcc0fb6a45ded00b66d9fb0fbd9a499e69f | |
parent | 6551e69fd458766a22f6929fa46ac3197d6a3267 (diff) | |
parent | 0e187d758cd4ad0f929b90b04adee7ec19f7fc93 (diff) |
Merge branch 'rs/run-command-use-alloc-array'
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; |