mirror of
https://git.busybox.net/busybox
synced 2026-01-31 16:43:21 +00:00
capability: fix string comparison in cap_name_to_number
The result of strcasecmp was being used incorrectly. This function returns 0 if the strings match. Signed-off-by: Mark Marshall <mark.marshall@omicronenergy.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
fc472ea187
commit
11cb9eeffe
1 changed files with 1 additions and 1 deletions
|
|
@ -67,7 +67,7 @@ unsigned FAST_FUNC cap_name_to_number(const char *cap)
|
|||
goto found;
|
||||
}
|
||||
for (i = 0; i < ARRAY_SIZE(capabilities); i++) {
|
||||
if (strcasecmp(capabilities[i], cap) != 0)
|
||||
if (strcasecmp(capabilities[i], cap) == 0)
|
||||
goto found;
|
||||
}
|
||||
bb_error_msg_and_die("unknown capability '%s'", cap);
|
||||
|
|
|
|||
Loading…
Reference in a new issue