Next: dll_destroy_dnode, Previous: dll_destroy_head, Up: Doubly Linked Lists
Remove the tail node from a doubly linked list and destroy it.
#include <linklist/linklist.h>void *dll_destroy_tail(DLinkList ull);
DLinkList ull
- the list from which to remove the node
This routine removes the tail 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 list is empty, it
returns NULL
.