diff options
Diffstat (limited to 'libbb/compare_string_array.c')
-rw-r--r-- | libbb/compare_string_array.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libbb/compare_string_array.c b/libbb/compare_string_array.c index 151b50817..ec7f94e79 100644 --- a/libbb/compare_string_array.c +++ b/libbb/compare_string_array.c | |||
@@ -23,7 +23,7 @@ int index_in_strings(const char *strings, const char *key) | |||
23 | { | 23 | { |
24 | int idx = 0; | 24 | int idx = 0; |
25 | 25 | ||
26 | while (strings[0]) { | 26 | while (*strings) { |
27 | if (strcmp(strings, key) == 0) { | 27 | if (strcmp(strings, key) == 0) { |
28 | return idx; | 28 | return idx; |
29 | } | 29 | } |
@@ -57,7 +57,7 @@ int index_in_substrings(const char *strings, const char *key) | |||
57 | 57 | ||
58 | if (len) { | 58 | if (len) { |
59 | int idx = 0; | 59 | int idx = 0; |
60 | while (strings[0]) { | 60 | while (*strings) { |
61 | if (strncmp(strings, key, len) == 0) { | 61 | if (strncmp(strings, key, len) == 0) { |
62 | return idx; | 62 | return idx; |
63 | } | 63 | } |