Skip to content

Commit c146e17

Browse files
committed
Remove unused function match_fs
This function isn't called anywhere. Addressing GCC warning: /home/jcerny/openscap/src/OVAL/probes/fsdev.c:90:12: warning: ‘match_fs’ defined but not used [-Wunused-function] static int match_fs(const char *fsname, const char **fs_arr, size_t fs_cnt) ^~~~~~~~
1 parent 82fee23 commit c146e17

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

src/OVAL/probes/fsdev.c

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -81,37 +81,6 @@ static int fsname_cmp(const void *a, const void *b)
8181
return strcmp(a, b);
8282
}
8383

84-
/**
85-
* Search for a filesystem name in a sorted array using binary search.
86-
* @param fsname name
87-
* @param fs_arr sorted array of filesystem names
88-
* @param fs_cnt number of names in the array
89-
* @retval 1 if found
90-
* @retval 0 otherwise
91-
*/
92-
static int match_fs(const char *fsname, const char **fs_arr, size_t fs_cnt)
93-
{
94-
size_t w, s;
95-
int cmp;
96-
97-
w = fs_cnt;
98-
s = 0;
99-
100-
while (w > 0) {
101-
cmp = fsname_cmp(fsname, fs_arr[s + w / 2]);
102-
if (cmp > 0) {
103-
s += w / 2 + 1;
104-
w = w - w / 2 - 1;
105-
} else if (cmp < 0) {
106-
w = w / 2;
107-
} else {
108-
return (1);
109-
}
110-
}
111-
112-
return (0);
113-
}
114-
11584
#if defined(__linux__) || defined(_AIX)
11685

11786
#define DEVID_ARRAY_SIZE 16

0 commit comments

Comments
 (0)