diff options
Diffstat (limited to 'libbb/llist.c')
-rw-r--r-- | libbb/llist.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libbb/llist.c b/libbb/llist.c index 5ba7f6047..51b1ce6c9 100644 --- a/libbb/llist.c +++ b/libbb/llist.c | |||
@@ -86,3 +86,13 @@ llist_t* FAST_FUNC llist_rev(llist_t *list) | |||
86 | } | 86 | } |
87 | return rev; | 87 | return rev; |
88 | } | 88 | } |
89 | |||
90 | llist_t* FAST_FUNC llist_find_str(llist_t *list, const char *str) | ||
91 | { | ||
92 | while (list) { | ||
93 | if (strcmp(list->data, str) == 0) | ||
94 | break; | ||
95 | list = list->link; | ||
96 | } | ||
97 | return list; | ||
98 | } | ||