Function llist_filter2
Defined in File llist.h
Function Documentation
-
status_t llist_filter2(struct llist *list, bool_t (*pred)(const void *e))
Filter out items that satisfy a predicate from a llist.
This routine iterates through the llist and finds all the items that satisfy the predicate, and removes them from the list. If no elements are found that fulfill the predicate, no modifications are made to the list. Memory for both the matching llist_nodes and the data they contain are deallocated.
- Parameters:
list – The linked list handle.
pred – The predicate for determining element membership in the new list.
- Returns: