Next: , Previous: dll_destroy, Up: Doubly Linked Lists


3.2.5 dll_destroy_head

Remove the head node from a doubly linked list and destroy it.

Synopsis

     #include <linklist/linklist.h>
     
     
     
void *dll_destroy_head(DLinkList ull);

Parameters

DLinkList ull
the list from which to remove the node

Description

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.

Returns

It returns the node's data pointer. If the list is empty, it returns NULL.