Imported Upstream version 2.10.3
[platform/upstream/git.git] / pathspec.c
index 24e0dd5..49a5360 100644 (file)
@@ -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)