summaryrefslogtreecommitdiff
path: root/attr.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2014-12-27 23:39:46 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-12-29 20:40:42 (GMT)
commitaa7710e064a9ee644e1e86bd6f89193200ac4ccd (patch)
treee11a470af61f60e05bf39ca3f654c9e93aedf761 /attr.c
parentc2e8e4b9da4d007b15faa2e3d407b2fd279f0572 (diff)
downloadgit-aa7710e064a9ee644e1e86bd6f89193200ac4ccd.zip
git-aa7710e064a9ee644e1e86bd6f89193200ac4ccd.tar.gz
git-aa7710e064a9ee644e1e86bd6f89193200ac4ccd.tar.bz2
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>
Diffstat (limited to 'attr.c')
-rw-r--r--attr.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/attr.c b/attr.c
index cd54697..a1758bf 100644
--- a/attr.c
+++ b/attr.c
@@ -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;
}