move llist_find_str from modutils to libbb

This commit is contained in:
Denis Vlasenko
2009-04-13 20:52:00 +00:00
parent 4144504912
commit 0b791d9a97
6 changed files with 17 additions and 34 deletions

View File

@@ -86,3 +86,13 @@ llist_t* FAST_FUNC llist_rev(llist_t *list)
}
return rev;
}
llist_t* FAST_FUNC llist_find_str(llist_t *list, const char *str)
{
while (list) {
if (strcmp(list->data, str) == 0)
break;
list = list->link;
}
return list;
}