diff options
author | vodz <vodz@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2005-11-26 10:45:26 +0000 |
---|---|---|
committer | vodz <vodz@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2005-11-26 10:45:26 +0000 |
commit | 0d9ad9dd2ee75f7b433779cebbe38e99b3b254aa (patch) | |
tree | 88ad65a7ac7c081822978ca80acc27ee4dd928ee /libbb | |
parent | 3082af9bcfed3f7ab3b39eaf7a02aa051043cbf1 (diff) | |
download | busybox-w32-0d9ad9dd2ee75f7b433779cebbe38e99b3b254aa.tar.gz busybox-w32-0d9ad9dd2ee75f7b433779cebbe38e99b3b254aa.tar.bz2 busybox-w32-0d9ad9dd2ee75f7b433779cebbe38e99b3b254aa.zip |
change the interface of libbb/compare_string_array (unsigned short to int), usaging for e2fsprogs/fsck
git-svn-id: svn://busybox.net/trunk/busybox@12535 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/compare_string_array.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libbb/compare_string_array.c b/libbb/compare_string_array.c index 8961e003e..fc077b309 100644 --- a/libbb/compare_string_array.c +++ b/libbb/compare_string_array.c | |||
@@ -17,16 +17,16 @@ | |||
17 | #include <string.h> | 17 | #include <string.h> |
18 | 18 | ||
19 | /* returns the array number of the string */ | 19 | /* returns the array number of the string */ |
20 | extern unsigned short | 20 | extern int |
21 | compare_string_array(const char * const string_array[], const char *key) | 21 | compare_string_array(const char * const string_array[], const char *key) |
22 | { | 22 | { |
23 | unsigned short i; | 23 | int i; |
24 | 24 | ||
25 | for (i = 0; string_array[i] != 0; i++) { | 25 | for (i = 0; string_array[i] != 0; i++) { |
26 | if (strcmp(string_array[i], key) == 0) { | 26 | if (strcmp(string_array[i], key) == 0) { |
27 | break; | 27 | return i; |
28 | } | 28 | } |
29 | } | 29 | } |
30 | return(i); | 30 | return -i; |
31 | } | 31 | } |
32 | 32 | ||