static const char blank[] = " \t\r\n";
static const char *parse_attr(const char *src, int lineno, const char *cp,
- int *num_attr, struct match_attr *res)
+ int num_attr, struct match_attr *res)
{
const char *ep, *equals;
int len;
} else {
struct attr_state *e;
- e = &(res->state[*num_attr]);
+ e = &(res->state[num_attr]);
if (*cp == '-' || *cp == '!') {
e->setto = (*cp == '-') ? ATTR__FALSE : ATTR__UNSET;
cp++;
}
e->attr = git_attr_internal(cp, len);
}
- (*num_attr)++;
return ep + strspn(ep, blank);
}
cp = name + namelen;
cp = cp + strspn(cp, blank);
while (*cp) {
- cp = parse_attr(src, lineno, cp, &num_attr, res);
+ cp = parse_attr(src, lineno, cp, num_attr, res);
if (!cp)
return NULL;
+ num_attr++;
}
if (pass)
break;