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
This commit is contained in:
Junio C Hamano
2023-01-21 17:21:58 -08:00
9 changed files with 30 additions and 23 deletions

3
attr.c
View File

@ -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;
}