Add return value and comment to new/recent linklist api
to clean up compile warning.
Signed-off-by: Mark Stapp <mjs@voltanet.io>
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();
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
}