Skip to content

Commit d4cf11e

Browse files
committed
Remove unused function fsdev_strinit
This function isn't used anywhere and it isn't a part of public API.
1 parent f47e702 commit d4cf11e

File tree

2 files changed

+0
-53
lines changed

2 files changed

+0
-53
lines changed

src/OVAL/probes/fsdev.c

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -366,53 +366,6 @@ static inline int isfschar(int c)
366366
return (isalpha(c) || isdigit(c) || c == '-' || c == '_');
367367
}
368368

369-
fsdev_t *fsdev_strinit(const char *fs_names)
370-
{
371-
fsdev_t *lfs;
372-
char *pstr, **fs_arr;
373-
size_t fs_cnt;
374-
int state, e;
375-
376-
pstr = strdup(fs_names);
377-
state = 0;
378-
fs_arr = NULL;
379-
fs_cnt = 0;
380-
381-
while (*pstr != '\0') {
382-
switch (state) {
383-
case 0:
384-
if (isfschar(*pstr)) {
385-
state = 1;
386-
++fs_cnt;
387-
fs_arr = realloc(fs_arr, sizeof(char *) * fs_cnt);
388-
fs_arr[fs_cnt - 1] = pstr;
389-
}
390-
391-
++pstr;
392-
393-
break;
394-
case 1:
395-
if (!isfschar(*pstr) && *pstr != '\0') {
396-
state = 0;
397-
*pstr = '\0';
398-
++pstr;
399-
}
400-
break;
401-
}
402-
}
403-
404-
if (fs_arr != NULL && fs_cnt > 0)
405-
qsort(fs_arr, fs_cnt, sizeof(char *), fsname_cmp);
406-
407-
lfs = fsdev_init((const char **)fs_arr, fs_cnt);
408-
e = errno;
409-
free(fs_arr);
410-
errno = e;
411-
free(pstr);
412-
413-
return (lfs);
414-
}
415-
416369
void fsdev_free(fsdev_t * lfs)
417370
{
418371
if (lfs != NULL) {

src/OVAL/probes/public/fsdev.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,6 @@ typedef struct {
5050
*/
5151
fsdev_t *fsdev_init(const char **fs, size_t fs_cnt);
5252

53-
/**
54-
* Initialize the fsdev_t structure from a string containing filesystem
55-
* names.
56-
*/
57-
fsdev_t *fsdev_strinit(const char *fs_names);
58-
5953
/**
6054
* Free the fsdev_t structure.
6155
*/

0 commit comments

Comments
 (0)