diff options
| author | Junio C Hamano <gitster@pobox.com> | 2016-10-03 13:30:33 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2016-10-03 13:30:33 -0700 |
| commit | b1f0a856605981363053941b8210f3cc9389607a (patch) | |
| tree | 9de4bc7cc285925913c219edd4536985cc0cc256 /pathspec.c | |
| parent | 3ef7618e616e023cf04180e30d77c9fa5310f964 (diff) | |
| parent | 45ccef87b3cc0ab09ec5fd1186aa0b33298ee8d4 (diff) | |
| download | git-b1f0a856605981363053941b8210f3cc9389607a.tar.gz | |
Merge branch 'rs/copy-array'
Code cleanup.
* rs/copy-array:
use COPY_ARRAY
add COPY_ARRAY
Diffstat (limited to 'pathspec.c')
| -rw-r--r-- | pathspec.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/pathspec.c b/pathspec.c index 24e0dd5232..49a53607bb 100644 --- a/pathspec.c +++ b/pathspec.c @@ -485,8 +485,7 @@ void copy_pathspec(struct pathspec *dst, const struct pathspec *src) { *dst = *src; ALLOC_ARRAY(dst->items, dst->nr); - memcpy(dst->items, src->items, - sizeof(struct pathspec_item) * dst->nr); + COPY_ARRAY(dst->items, src->items, dst->nr); } void clear_pathspec(struct pathspec *pathspec) |
