From 0d9ad9dd2ee75f7b433779cebbe38e99b3b254aa Mon Sep 17 00:00:00 2001 From: vodz Date: Sat, 26 Nov 2005 10:45:26 +0000 Subject: 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 --- libbb/compare_string_array.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libbb') 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 @@ #include /* returns the array number of the string */ -extern unsigned short +extern int compare_string_array(const char * const string_array[], const char *key) { - unsigned short i; + int i; for (i = 0; string_array[i] != 0; i++) { if (strcmp(string_array[i], key) == 0) { - break; + return i; } } - return(i); + return -i; } -- cgit v1.2.3-55-g6feb