setpriv: placete "declaration of 'index' shadows a global declaration" warning
authorDenys Vlasenko <vda.linux@googlemail.com>
Tue, 29 Aug 2017 13:34:38 +0000 (15:34 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Tue, 29 Aug 2017 13:34:38 +0000 (15:34 +0200)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
util-linux/setpriv.c

index 12ab1bd66565e6b1ea14d81ba16f20e83bb852e6..af079fae8b4a0208af205a801c5c9b77c33bc352 100644 (file)
@@ -173,14 +173,14 @@ static void set_ambient_caps(char *string)
 
        cap = strtok(string, ",");
        while (cap) {
-               unsigned index;
+               unsigned idx;
 
-               index = parse_cap(cap);
+               idx = parse_cap(cap);
                if (cap[0] == '+') {
-                       if (prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_RAISE, index, 0, 0) < 0)
+                       if (prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_RAISE, idx, 0, 0) < 0)
                                bb_perror_msg("cap_ambient_raise");
                } else {
-                       if (prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_LOWER, index, 0, 0) < 0)
+                       if (prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_LOWER, idx, 0, 0) < 0)
                                bb_perror_msg("cap_ambient_lower");
                }
                cap = strtok(NULL, ",");