src/adlist.c
static void _listEmpty(list *list, int on_dram)
{
    unsigned long len;
    listNode *current, *next;

    current = list->head;
    len = list->len;
    while(len--) {
        next = current->next;
        if (list->free) list->free(current->value);
        if (on_dram == LIST_DRAM_VARIANT) zfree_dram(current); else zfree(current);
        current = next;
    }
    list->head = list->tail = NULL;
    list->len = 0;
}
/* Remove all the elements from the list without destroying the list itself. */
Remove all the elements from the list without destroying the list itself.
Remove all the elements from the list without destroying the list itself .
static void _listEmpty(list *list, int on_dram)
{
    unsigned long len;
    listNode *current, *next;
    current = list->head;
    len = list->len;
    while(len--) {
        next = current->next;
        if (list->free) list->free(current->value);
        if (on_dram == LIST_DRAM_VARIANT) zfree_dram(current); else zfree(current);
        current = next;
    }
    list->head = list->tail = NULL;
    list->len = 0;
}
static void _listEmpty ( list * list , int on_dram ) { unsigned long len ; listNode * current , * next ; current = list -> head ; len = list -> len ; while ( len -- ) { next = current -> next ; if ( list -> free ) list -> free ( current -> value ) ; if ( on_dram == LIST_DRAM_VARIANT ) zfree_dram ( current ) ; else zfree ( current ) ; current = next ; } list -> head = list -> tail = NULL ; list -> len = 0 ; }
Remove all the elements from the list without destroying the list itself.
Remove all the elements from the list without destroying the list itself .