Skip to content

Commit

Permalink
attr.c: rename arg name attr_nr to avoid shadowing the global one
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nguyễn Thái Ngọc Duy authored and Junio C Hamano committed Dec 29, 2014
1 parent c2e8e4b commit aa7710e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions attr.c
Original file line number Diff line number Diff line change
Expand Up @@ -681,21 +681,21 @@ 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)
for (i = stk->num_matches - 1; !a && 0 <= i; i--) {
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;
}

Expand Down

0 comments on commit aa7710e

Please sign in to comment.