Next: , Previous: Singly Linked Lists, Up: Singly Linked Lists


3.1.1 sll_count

Determine the number of nodes in a singly linked list.

Synopsis

     #include <linklist/linklist.h>
     
     
     
size_t sll_count(SLinkList ull);

Parameters

SLinkList ull
the list to count

Description

This function returns the number of nodes in a list. It is an inexpensive routine to call.

Returns

It returns the number of nodes in the list, ‘0’ if the passed pointer is NULL.