diff options
-rw-r--r-- | lib/linklist.c | 7 | ||||
-rw-r--r-- | lib/linklist.h | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/lib/linklist.c b/lib/linklist.c index 3aa7cae8b..b8d9a47d2 100644 --- a/lib/linklist.c +++ b/lib/linklist.c @@ -259,6 +259,13 @@ struct listnode *listnode_lookup(struct list *list, void *data) return NULL; } +struct listnode *listnode_lookup_nocheck(struct list *list, void *data) +{ + if (!list) + return NULL; + return listnode_lookup(list, data); +} + void list_delete_node(struct list *list, struct listnode *node) { if (node->prev) diff --git a/lib/linklist.h b/lib/linklist.h index 76fad45d0..aac3179fb 100644 --- a/lib/linklist.h +++ b/lib/linklist.h @@ -341,6 +341,8 @@ extern void list_add_list(struct list *list, struct list *add); (L)->count--; \ } while (0) +extern struct listnode *listnode_lookup_nocheck(struct list *list, void *data); + #ifdef __cplusplus } #endif |