diff options
author | Philippe Guibert <philippe.guibert@6wind.com> | 2019-03-28 17:59:27 +0100 |
---|---|---|
committer | Philippe Guibert <philippe.guibert@6wind.com> | 2019-03-29 15:04:17 +0100 |
commit | 2fe55afeec519afbe4fac45c0d0b8d4331f623aa (patch) | |
tree | 3e850f5813a5e5551b5a4a64adf02c2be8be89cf /lib/linklist.h | |
parent | bgpd: do not allocate lists on fs entries of bgp entries. (diff) | |
download | frr-2fe55afeec519afbe4fac45c0d0b8d4331f623aa.tar.xz frr-2fe55afeec519afbe4fac45c0d0b8d4331f623aa.zip |
lib: add lookup utility routine that accepts null list values
lists passed as parameter that are null, are accepted by the function.
I would even propose to silently return NULL in official
listnode_lookup() routine.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'lib/linklist.h')
-rw-r--r-- | lib/linklist.h | 2 |
1 files changed, 2 insertions, 0 deletions
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 |