Next: dll_detach_head_node, Previous: dll_destroy_dnode, Up: Doubly Linked Lists
Remove a node from a doubly linked list and destroy it.
#include <linklist/linklist.h>void *dll_destroy_node( DLinkList ull, DLLNode unode );
DLinkList ull
- the list from which to remove the node
DLLNode unode
- the node to remove
This routine removes the passed node from the specified list and deallocates the memory associated with it. The user must destroy the data referenced by the node's data pointer.
It returns the node's data pointer if the node is not NULL
,
NULL
otherwise.