struct match {
struct match *next;
- int matches;
+ int matched;
struct archive_mstring pattern;
};
matched = NULL;
for (match = a->inclusions.first; match != NULL;
match = match->next){
- if (match->matches == 0 &&
+ if (!match->matched &&
(r = match_path_inclusion(a, match, mbs, pathname)) != 0) {
if (r < 0)
return (r);
a->inclusions.unmatched_count--;
- match->matches++;
+ match->matched = 1;
matched = match;
}
}
for (match = a->inclusions.first; match != NULL;
match = match->next){
/* We looked at previously-unmatched inclusions already. */
- if (match->matches > 0 &&
+ if (match->matched &&
(r = match_path_inclusion(a, match, mbs, pathname)) != 0) {
if (r < 0)
return (r);
- match->matches++;
return (0);
}
}
for (m = list->unmatched_next; m != NULL; m = m->next) {
int r;
- if (m->matches)
+ if (m->matched)
continue;
if (mbs) {
const char *p;
< 0 && errno == ENOMEM)
return (error_nomem(a));
if (p != NULL && strcmp(p, name) == 0) {
- m->matches++;
+ m->matched = 1;
return (1);
}
}
< 0 && errno == ENOMEM)
return (error_nomem(a));
if (p != NULL && wcscmp(p, name) == 0) {
- m->matches++;
+ m->matched = 1;
return (1);
}
}