src/slist.h
static inline void
slist_remove(struct slist *list, struct slist_node *prev)
{
    struct slist_node *node;

    if (slist_end(prev)) {
        node = list->first;
        list->first = node->next;

        if (list->last == node) {
            list->last = NULL;
        }
    } else {
        node = prev->next;
        prev->next = node->next;

        if (list->last == node) {
            list->last = prev;
        }
    }
}
/*
 * Remove a node from a list.
 *
 * The prev argument must point to the node immediately preceding the target
 * node. It may safely denote the end of the given list (NULL), in which case
 * the first node is removed.
 */
Remove a node from a list.
The prev argument must point to the node immediately preceding the target
node. It may safely denote the end of the given list (NULL), in which case
the first node is removed.
Remove a node from a list . The prev argument must point to the node immediately preceding the target node . It may safely denote the end of the given list ( NULL ) in which case the first node is removed .
static inline void
slist_remove(struct slist *list, struct slist_node *prev)
{
    struct slist_node *node;
    if (slist_end(prev)) {
        node = list->first;
        list->first = node->next;
        if (list->last == node) {
            list->last = NULL;
        }
    } else {
        node = prev->next;
        prev->next = node->next;
        if (list->last == node) {
            list->last = prev;
        }
    }
}
static inline void slist_remove ( struct slist * list , struct slist_node * prev ) { struct slist_node * node ; if ( slist_end ( prev ) ) { node = list -> first ; list -> first = node -> next ; if ( list -> last == node ) { list -> last = NULL ; } } else { node = prev -> next ; prev -> next = node -> next ; if ( list -> last == node ) { list -> last = prev ; } } }
Remove a node from a list.
Remove a node from a list .