openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/sysfsutils/2.1.0-r5/sysfsutils-2.1.0/lib/dlist.c
Dlist* dlist_new(size_t datasize)
{
    Dlist* list = NULL;
    if ((list = malloc(sizeof(Dlist))))
    {
        list->marker = NULL;
        list->count = 0L;
        list->data_size = datasize;
        list->del_func = free;
        list->head = &(list->headnode);
        list->head->prev = NULL;
        list->head->next = NULL;
        list->head->data = NULL;
    }
    return (list);
}
/*
 * Create new linked list to store nodes of datasize.
 * return null if list cannot be created.
 */
Create new linked list to store nodes of datasize.
return null if list cannot be created.
Create new linked list to store nodes of datasize . return null if list cannot be created .
Dlist* dlist_new(size_t datasize)
{
    Dlist* list = NULL;
    if ((list = malloc(sizeof(Dlist))))
    {
        list->marker = NULL;
        list->count = 0L;
        list->data_size = datasize;
        list->del_func = free;
        list->head = &(list->headnode);
        list->head->prev = NULL;
        list->head->next = NULL;
        list->head->data = NULL;
    }
    return (list);
}
Dlist * dlist_new ( size_t datasize ) { Dlist * list = NULL ; if ( ( list = malloc ( sizeof ( Dlist ) ) ) ) { list -> marker = NULL ; list -> count = 0L ; list -> data_size = datasize ; list -> del_func = free ; list -> head = & ( list -> headnode ) ; list -> head -> prev = NULL ; list -> head -> next = NULL ; list -> head -> data = NULL ; } return ( list ) ; }
Create new linked list to store nodes of datasize.
Create new linked list to store nodes of datasize .