Next: sll_destroy_tail, Previous: sll_destroy, Up: Singly Linked Lists
Remove the head node from a singly linked list and destroy it.
#include <linklist/linklist.h>void *sll_destroy_head(SLinkList ull);
SLinkList ull
- the list from which to remove the node
This routine removes the head 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
.