attr.c: rename arg name attr_nr to avoid shadowing the global one

Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Nguyễn Thái Ngọc Duy 2014-12-28 06:39:46 +07:00 committed by Junio C Hamano
parent c2e8e4b9da
commit aa7710e064

6
attr.c
View File

@ -681,13 +681,13 @@ static int fill(const char *path, int pathlen, int basename_offset,
return rem;
}
static int macroexpand_one(int attr_nr, int rem)
static int macroexpand_one(int nr, int rem)
{
struct attr_stack *stk;
struct match_attr *a = NULL;
int i;
if (check_all_attr[attr_nr].value != ATTR__TRUE)
if (check_all_attr[nr].value != ATTR__TRUE)
return rem;
for (stk = attr_stack; !a && stk; stk = stk->prev)
@ -695,7 +695,7 @@ static int macroexpand_one(int attr_nr, int rem)
struct match_attr *ma = stk->attrs[i];
if (!ma->is_macro)
continue;
if (ma->u.attr->attr_nr == attr_nr)
if (ma->u.attr->attr_nr == nr)
a = ma;
}