From 0b791d9a976e46b2705ae73046706ab9ac3768be Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Mon, 13 Apr 2009 20:52:00 +0000 Subject: move llist_find_str from modutils to libbb --- modutils/modutils.c | 13 ------------- modutils/modutils.h | 1 - 2 files changed, 14 deletions(-) (limited to 'modutils') diff --git a/modutils/modutils.c b/modutils/modutils.c index 44dae7bc5..0f6cb0f2d 100644 --- a/modutils/modutils.c +++ b/modutils/modutils.c @@ -16,19 +16,6 @@ extern int delete_module(const char *module, unsigned int flags); # define delete_module(mod, flags) syscall(__NR_delete_module, mod, flags) #endif -/* - a libbb candidate from ice age! -*/ -llist_t FAST_FUNC *llist_find(llist_t *first, const char *str) -{ - while (first != NULL) { - if (strcmp(first->data, str) == 0) - return first; - first = first->link; - } - return NULL; -} - void FAST_FUNC replace(char *s, char what, char with) { while (*s) { diff --git a/modutils/modutils.h b/modutils/modutils.h index 086bb3977..5104f1b6e 100644 --- a/modutils/modutils.h +++ b/modutils/modutils.h @@ -18,7 +18,6 @@ PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN #define MODULE_NAME_LEN 256 const char *moderror(int err) FAST_FUNC; -llist_t *llist_find(llist_t *first, const char *str) FAST_FUNC; void replace(char *s, char what, char with) FAST_FUNC; char *replace_underscores(char *s) FAST_FUNC; int string_to_llist(char *string, llist_t **llist, const char *delim) FAST_FUNC; -- cgit v1.2.3