diff options
| author | Junio C Hamano <gitster@pobox.com> | 2023-01-21 17:21:58 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2023-01-21 17:21:58 -0800 |
| commit | 60ce816cb637f8fac5e8e5b8a53dff8707b2c04c (patch) | |
| tree | 54c95811c38748e928c7e788812844d85e8a059d /builtin/am.c | |
| parent | Merge branch 'jx/t1301-updates' (diff) | |
| parent | use DUP_ARRAY (diff) | |
| download | git-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.c | 3 |
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, |
