diff options
author | Denis Vlasenko | 2009-04-13 20:52:00 +0000 |
---|---|---|
committer | Denis Vlasenko | 2009-04-13 20:52:00 +0000 |
commit | 0b791d9a976e46b2705ae73046706ab9ac3768be (patch) | |
tree | c97a6ccdf5b8eb54ecac8991024fa8c80d01ff6e /libbb | |
parent | 4144504912954b0d31c5bbe5f13df5a4ec4f122a (diff) | |
download | busybox-0b791d9a976e46b2705ae73046706ab9ac3768be.zip busybox-0b791d9a976e46b2705ae73046706ab9ac3768be.tar.gz |
move llist_find_str from modutils to libbb
Diffstat (limited to 'libbb')
-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 5ba7f60..51b1ce6 100644 --- a/libbb/llist.c +++ b/libbb/llist.c @@ -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; +} |