summaryrefslogtreecommitdiff
path: root/libbb/llist.c
diff options
context:
space:
mode:
authorDenis Vlasenko2009-04-13 20:52:00 +0000
committerDenis Vlasenko2009-04-13 20:52:00 +0000
commit0b791d9a976e46b2705ae73046706ab9ac3768be (patch)
treec97a6ccdf5b8eb54ecac8991024fa8c80d01ff6e /libbb/llist.c
parent4144504912954b0d31c5bbe5f13df5a4ec4f122a (diff)
downloadbusybox-0b791d9a976e46b2705ae73046706ab9ac3768be.zip
busybox-0b791d9a976e46b2705ae73046706ab9ac3768be.tar.gz
move llist_find_str from modutils to libbb
Diffstat (limited to 'libbb/llist.c')
-rw-r--r--libbb/llist.c10
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;
+}