mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-16 04:50:29 +00:00
lib: kill unused list_filter_out_nodes()
pimd was the only user of this function, and that has gone away now. So just kill the function. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
This commit is contained in:
parent
fdab294037
commit
02fb02de37
@ -320,23 +320,6 @@ void list_delete_all_node(struct list *list)
|
|||||||
list->count = 0;
|
list->count = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void list_filter_out_nodes(struct list *list, bool (*cond)(void *data))
|
|
||||||
{
|
|
||||||
struct listnode *node;
|
|
||||||
struct listnode *next;
|
|
||||||
void *data;
|
|
||||||
|
|
||||||
assert(list);
|
|
||||||
|
|
||||||
for (ALL_LIST_ELEMENTS(list, node, next, data)) {
|
|
||||||
if ((cond && cond(data)) || (!cond)) {
|
|
||||||
if (*list->del)
|
|
||||||
(*list->del)(data);
|
|
||||||
list_delete_node(list, node);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void list_delete(struct list **list)
|
void list_delete(struct list **list)
|
||||||
{
|
{
|
||||||
assert(*list);
|
assert(*list);
|
||||||
|
@ -294,19 +294,6 @@ extern void list_delete_all_node(struct list *list);
|
|||||||
*/
|
*/
|
||||||
extern void list_delete_node(struct list *list, struct listnode *node);
|
extern void list_delete_node(struct list *list, struct listnode *node);
|
||||||
|
|
||||||
/*
|
|
||||||
* Delete all nodes which satisfy a condition from a list.
|
|
||||||
* Deletes the node if cond function returns true for the node.
|
|
||||||
* If function ptr passed is NULL, it deletes all nodes
|
|
||||||
*
|
|
||||||
* list
|
|
||||||
* list to operate on
|
|
||||||
* cond
|
|
||||||
* function pointer which takes node data as input and return true or false
|
|
||||||
*/
|
|
||||||
|
|
||||||
extern void list_filter_out_nodes(struct list *list, bool (*cond)(void *data));
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Insert a new element into a list with insertion sort if there is no
|
* Insert a new element into a list with insertion sort if there is no
|
||||||
* duplicate element present in the list. This assumes the input list is
|
* duplicate element present in the list. This assumes the input list is
|
||||||
|
Loading…
Reference in New Issue
Block a user