diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2017-08-29 15:34:38 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2017-08-29 15:34:38 +0200 |
commit | 0180b57aaf9fd18c2f54be508a1dc2a64f848ed1 (patch) | |
tree | 4aa211434015400a595d31a50033e8350b281f0a | |
parent | 9fed83a7ccd589889bc08852584d5b4663fef2e0 (diff) | |
download | busybox-w32-0180b57aaf9fd18c2f54be508a1dc2a64f848ed1.tar.gz busybox-w32-0180b57aaf9fd18c2f54be508a1dc2a64f848ed1.tar.bz2 busybox-w32-0180b57aaf9fd18c2f54be508a1dc2a64f848ed1.zip |
setpriv: placete "declaration of 'index' shadows a global declaration" warning
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | util-linux/setpriv.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/util-linux/setpriv.c b/util-linux/setpriv.c index 12ab1bd66..af079fae8 100644 --- a/util-linux/setpriv.c +++ b/util-linux/setpriv.c | |||
@@ -173,14 +173,14 @@ static void set_ambient_caps(char *string) | |||
173 | 173 | ||
174 | cap = strtok(string, ","); | 174 | cap = strtok(string, ","); |
175 | while (cap) { | 175 | while (cap) { |
176 | unsigned index; | 176 | unsigned idx; |
177 | 177 | ||
178 | index = parse_cap(cap); | 178 | idx = parse_cap(cap); |
179 | if (cap[0] == '+') { | 179 | if (cap[0] == '+') { |
180 | if (prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_RAISE, index, 0, 0) < 0) | 180 | if (prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_RAISE, idx, 0, 0) < 0) |
181 | bb_perror_msg("cap_ambient_raise"); | 181 | bb_perror_msg("cap_ambient_raise"); |
182 | } else { | 182 | } else { |
183 | if (prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_LOWER, index, 0, 0) < 0) | 183 | if (prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_LOWER, idx, 0, 0) < 0) |
184 | bb_perror_msg("cap_ambient_lower"); | 184 | bb_perror_msg("cap_ambient_lower"); |
185 | } | 185 | } |
186 | cap = strtok(NULL, ","); | 186 | cap = strtok(NULL, ","); |