aboutsummaryrefslogtreecommitdiffstats
path: root/builtin/am.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-01-21 17:21:58 -0800
committerJunio C Hamano <gitster@pobox.com>2023-01-21 17:21:58 -0800
commit60ce816cb637f8fac5e8e5b8a53dff8707b2c04c (patch)
tree54c95811c38748e928c7e788812844d85e8a059d /builtin/am.c
parentMerge branch 'jx/t1301-updates' (diff)
parentuse DUP_ARRAY (diff)
downloadgit-60ce816cb637f8fac5e8e5b8a53dff8707b2c04c.tar.gz
git-60ce816cb637f8fac5e8e5b8a53dff8707b2c04c.zip
Merge branch 'rs/dup-array'
Code cleaning. * rs/dup-array: use DUP_ARRAY add DUP_ARRAY do full type check in BARF_UNLESS_COPYABLE factor out BARF_UNLESS_COPYABLE mingw: make argv2 in try_shell_exec() non-const
Diffstat (limited to 'builtin/am.c')
-rw-r--r--builtin/am.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/builtin/am.c b/builtin/am.c
index 7e88d2426d..82a41cbfc4 100644
--- a/builtin/am.c
+++ b/builtin/am.c
@@ -1492,8 +1492,7 @@ static int run_apply(const struct am_state *state, const char *index_file)
* apply_opts.v keeps referencing the allocated strings for
* strvec_clear() to release.
*/
- ALLOC_ARRAY(apply_argv, apply_opts.nr);
- COPY_ARRAY(apply_argv, apply_opts.v, apply_opts.nr);
+ DUP_ARRAY(apply_argv, apply_opts.v, apply_opts.nr);
opts_left = apply_parse_options(apply_opts.nr, apply_argv,
&apply_state, &force_apply, &options,