summaryrefslogtreecommitdiffstats
path: root/attr.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-01-22 02:21:58 +0100
committerJunio C Hamano <gitster@pobox.com>2023-01-22 02:21:58 +0100
commit60ce816cb637f8fac5e8e5b8a53dff8707b2c04c (patch)
tree54c95811c38748e928c7e788812844d85e8a059d /attr.c
parentMerge branch 'jx/t1301-updates' (diff)
parentuse DUP_ARRAY (diff)
downloadgit-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.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/attr.c b/attr.c
index 9922529b58..7783b87d8a 100644
--- a/attr.c
+++ b/attr.c
@@ -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;
}