diff options
author | Junio C Hamano <gitster@pobox.com> | 2023-01-22 02:21:58 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-01-22 02:21:58 +0100 |
commit | 60ce816cb637f8fac5e8e5b8a53dff8707b2c04c (patch) | |
tree | 54c95811c38748e928c7e788812844d85e8a059d /attr.c | |
parent | Merge branch 'jx/t1301-updates' (diff) | |
parent | use DUP_ARRAY (diff) | |
download | git-60ce816cb637f8fac5e8e5b8a53dff8707b2c04c.tar.xz 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 'attr.c')
-rw-r--r-- | attr.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -603,8 +603,7 @@ struct attr_check *attr_check_dup(const struct attr_check *check) ret->nr = check->nr; ret->alloc = check->alloc; - ALLOC_ARRAY(ret->items, ret->nr); - COPY_ARRAY(ret->items, check->items, ret->nr); + DUP_ARRAY(ret->items, check->items, ret->nr); return ret; } |