name-hash: properly fold directory names in adjust_dirname_case()
[gitweb.git] / pathspec.c
index c9e9b6c0778c755fcade1430cf674dfd867050f1..49a53607bb004e8ccc34e6a18eadc8dfc2e7879d 100644 (file)
@@ -485,11 +485,10 @@ 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 free_pathspec(struct pathspec *pathspec)
+void clear_pathspec(struct pathspec *pathspec)
 {
        free(pathspec->items);
        pathspec->items = NULL;