src/list.c
/** delete element with node.p == vp and return the node * if found and deleted, otherwise NULL */
delete element with node.p == vp and return the node * if found and deleted, otherwise NULL
delete element with node . p == vp and return the node * if found and deleted otherwise NULL
dllist_node_st *dllist_remove_val(dllist_node_st **head, void *vp)
{
    dllist_node_st *lp = *head;
    int rv;
    rv = 1;
    while (lp) {
        if (lp->p == vp) {
            if (lp == *head) {
                *head = lp->next;
                return lp;
            }
            else {
                lp->prev->next = lp->next;
                return lp;
            }
        }
        lp = lp->next;
    }
    return NULL;
}
dllist_node_st * dllist_remove_val ( dllist_node_st * * head , void * vp ) { dllist_node_st * lp = * head ; int rv ; rv = 1 ; while ( lp ) { if ( lp -> p == vp ) { if ( lp == * head ) { * head = lp -> next ; return lp ; } else { lp -> prev -> next = lp -> next ; return lp ; } } lp = lp -> next ; } return NULL ; }
delete element with node.p == vp and return the node * if found and deleted, otherwise NULL
delete element with node . p == vp and return the node * if found and deleted otherwise NULL