diff options
Diffstat (limited to 'ref-filter.c')
-rw-r--r-- | ref-filter.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ref-filter.c b/ref-filter.c index ab32bc9c31..e0578d8b5a 100644 --- a/ref-filter.c +++ b/ref-filter.c @@ -1624,7 +1624,7 @@ static int match_pattern(const struct ref_filter *filter, const char *refname) skip_prefix(refname, "refs/", &refname)); for (; *patterns; patterns++) { - if (!wildmatch(*patterns, refname, flags, NULL)) + if (!wildmatch(*patterns, refname, flags)) return 1; } return 0; @@ -1655,7 +1655,7 @@ static int match_name_as_path(const struct ref_filter *filter, const char *refna refname[plen] == '/' || p[plen-1] == '/')) return 1; - if (!wildmatch(p, refname, WM_PATHNAME, NULL)) + if (!wildmatch(p, refname, WM_PATHNAME)) return 1; } return 0; @@ -1891,8 +1891,7 @@ void ref_array_clear(struct ref_array *array) for (i = 0; i < array->nr; i++) free_array_item(array->items[i]); - free(array->items); - array->items = NULL; + FREE_AND_NULL(array->items); array->nr = array->alloc = 0; } |