mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-15 16:54:30 +00:00
lib: fix warning in linklist api
Add return value and comment to new/recent linklist api to clean up compile warning. Signed-off-by: Mark Stapp <mjs@voltanet.io>
This commit is contained in:
parent
8f19bc1c69
commit
75839aabb8
@ -328,7 +328,7 @@ void list_sort(struct list *list, int (*cmp)(const void **, const void **))
|
||||
XFREE(MTYPE_TMP, items);
|
||||
}
|
||||
|
||||
void listnode_add_force(struct list **list, void *val)
|
||||
struct listnode *listnode_add_force(struct list **list, void *val)
|
||||
{
|
||||
if (*list == NULL)
|
||||
*list = list_new();
|
||||
|
@ -343,7 +343,13 @@ extern void list_add_list(struct list *list, struct list *add);
|
||||
|
||||
extern struct listnode *listnode_lookup_nocheck(struct list *list, void *data);
|
||||
|
||||
extern void listnode_add_force(struct list **list, void *val);
|
||||
/*
|
||||
* Add a node to *list, if non-NULL. Otherwise, allocate a new list, mail
|
||||
* it back in *list, and add a new node.
|
||||
*
|
||||
* Return: the new node.
|
||||
*/
|
||||
extern struct listnode *listnode_add_force(struct list **list, void *val);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user