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 /parse-options.c | |
| parent | 90c47b3fbabd6ffecfd234911841892b562cfe9e (diff) | |
| parent | 6e578410960d9ceb35ec98ad4b6fc711f1a9c85c (diff) | |
| download | git-60ce816cb637f8fac5e8e5b8a53dff8707b2c04c.tar.xz | |
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 'parse-options.c')
| -rw-r--r-- | parse-options.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/parse-options.c b/parse-options.c index a1ec932f0f..fd4743293f 100644 --- a/parse-options.c +++ b/parse-options.c @@ -702,8 +702,7 @@ static struct option *preprocess_options(struct parse_opt_ctx_t *ctx, if (!nr_aliases) return NULL; - ALLOC_ARRAY(newopt, nr + 1); - COPY_ARRAY(newopt, options, nr + 1); + DUP_ARRAY(newopt, options, nr + 1); /* each alias has two string pointers and NULL */ CALLOC_ARRAY(ctx->alias_groups, 3 * (nr_aliases + 1)); |
