openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/base-passwd/3.5.29-r0/base-passwd-3.5.29/update-passwd.c
void remove_node(struct _node** head, struct _node* node)
{
    if (node == *head)
    {
        if (node->next)
        {
            node->next->last = (*head)->last;
            node->next->prev = NULL;
        }
        *head = node->next;
    }
    else
    {
        if (node == (*head)->last)
            (*head)->last = node->prev;
        if (node->prev)
            node->prev->next = node->next;
        if (node->next)
            node->next->prev = node->prev;
    }

    node->prev = NULL;
    node->next = NULL;
}
/* Remove an item from a list
 */
Remove an item from a list
Remove an item from a list
void remove_node(struct _node** head, struct _node* node)
{
    if (node == *head)
    {
        if (node->next)
        {
            node->next->last = (*head)->last;
            node->next->prev = NULL;
        }
        *head = node->next;
    }
    else
    {
        if (node == (*head)->last)
            (*head)->last = node->prev;
        if (node->prev)
            node->prev->next = node->next;
        if (node->next)
            node->next->prev = node->prev;
    }
    node->prev = NULL;
    node->next = NULL;
}
void remove_node ( struct _node * * head , struct _node * node ) { if ( node == * head ) { if ( node -> next ) { node -> next -> last = ( * head ) -> last ; node -> next -> prev = NULL ; } * head = node -> next ; } else { if ( node == ( * head ) -> last ) ( * head ) -> last = node -> prev ; if ( node -> prev ) node -> prev -> next = node -> next ; if ( node -> next ) node -> next -> prev = node -> prev ; } node -> prev = NULL ; node -> next = NULL ; }
Remove an item from a list
Remove an item from a list