aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--e2fsprogs/fsck.c13
-rw-r--r--include/libbb.h2
-rw-r--r--libbb/compare_string_array.c3
3 files changed, 7 insertions, 11 deletions
diff --git a/e2fsprogs/fsck.c b/e2fsprogs/fsck.c
index b7e25d68a..ae4e3d0c8 100644
--- a/e2fsprogs/fsck.c
+++ b/e2fsprogs/fsck.c
@@ -988,8 +988,7 @@ static int fs_match(struct fs_info *fs, struct fs_type_compile *cmp)
988/* Check if we should ignore this filesystem. */ 988/* Check if we should ignore this filesystem. */
989static int ignore(struct fs_info *fs) 989static int ignore(struct fs_info *fs)
990{ 990{
991 const char * const *ip; 991 int wanted;
992 int wanted = 0;
993 char *s; 992 char *s;
994 993
995 /* 994 /*
@@ -1007,15 +1006,11 @@ static int ignore(struct fs_info *fs)
1007 if (!fs_match(fs, &fs_type_compiled)) return 1; 1006 if (!fs_match(fs, &fs_type_compiled)) return 1;
1008 1007
1009 /* Are we ignoring this type? */ 1008 /* Are we ignoring this type? */
1010 for(ip = ignored_types; *ip; ip++) 1009 if(compare_string_array(ignored_types, fs->type))
1011 if (strcmp(fs->type, *ip) == 0) return 1; 1010 return 1;
1012 1011
1013 /* Do we really really want to check this fs? */ 1012 /* Do we really really want to check this fs? */
1014 for(ip = really_wanted; *ip; ip++) 1013 wanted = compare_string_array(really_wanted, fs->type);
1015 if (strcmp(fs->type, *ip) == 0) {
1016 wanted = 1;
1017 break;
1018 }
1019 1014
1020 /* See if the <fsck.fs> program is available. */ 1015 /* See if the <fsck.fs> program is available. */
1021 s = find_fsck(fs->type); 1016 s = find_fsck(fs->type);
diff --git a/include/libbb.h b/include/libbb.h
index b7dd48775..70a9336d8 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -466,7 +466,7 @@ typedef struct {
466} procps_status_t; 466} procps_status_t;
467 467
468extern procps_status_t * procps_scan(int save_user_arg0); 468extern procps_status_t * procps_scan(int save_user_arg0);
469extern unsigned short compare_string_array(const char *string_array[], const char *key); 469extern unsigned short compare_string_array(const char * const string_array[], const char *key);
470 470
471extern int my_query_module(const char *name, int which, void **buf, size_t *bufsize, size_t *ret); 471extern int my_query_module(const char *name, int which, void **buf, size_t *bufsize, size_t *ret);
472 472
diff --git a/libbb/compare_string_array.c b/libbb/compare_string_array.c
index 993b46266..8961e003e 100644
--- a/libbb/compare_string_array.c
+++ b/libbb/compare_string_array.c
@@ -17,7 +17,8 @@
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 */
20extern unsigned short compare_string_array(const char *string_array[], const char *key) 20extern unsigned short
21compare_string_array(const char * const string_array[], const char *key)
21{ 22{
22 unsigned short i; 23 unsigned short i;
23 24