attr.c: rename arg name attr_nr to avoid shadowing the global one
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Sat, 27 Dec 2014 23:39:46 +0000 (06:39 +0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 29 Dec 2014 20:40:42 +0000 (12:40 -0800)
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>
attr.c
diff --git a/attr.c b/attr.c
index cd5469770a6f7841ae327e6ba7141dd99d9cacc1..a1758bf537d09d77ad730ca2f2b928b4190d292c 100644 (file)
--- 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;
                }