src/rtlib/listdyn.c
/** Remove an element from the list.
 *
 * This function removes a list element from the list. It's up to the
 * caller to free the memory allocated by this element.
 *
 * @param list      Pointer to the list structure.
 * @param elem      Pointer to the element to remove from the list.
 */
Remove an element from the list.
This function removes a list element from the list. It's up to the
caller to free the memory allocated by this element.

@param list      Pointer to the list structure.
@param elem      Pointer to the element to remove from the list.
Remove an element from the list . This function removes a list element from the list . It ' s up to the caller to free the memory allocated by this element . @param list Pointer to the list structure . @param elem Pointer to the element to remove from the list .
void fb_hListDynElemRemove( FB_LIST *list, FB_LISTELEM *elem )
{
	if( elem->prev != NULL )
		elem->prev->next = elem->next;
	else
		list->head = elem->next;
	if( elem->next != NULL )
		elem->next->prev = elem->prev;
	else
		list->tail = elem->prev;
    elem->prev = elem->next = NULL;
	--list->cnt;
}
void fb_hListDynElemRemove ( FB_LIST * list , FB_LISTELEM * elem ) { if ( elem -> prev != NULL ) elem -> prev -> next = elem -> next ; else list -> head = elem -> next ; if ( elem -> next != NULL ) elem -> next -> prev = elem -> prev ; else list -> tail = elem -> prev ; elem -> prev = elem -> next = NULL ; -- list -> cnt ; }
Remove an element from the list.
Remove an element from the list .
/* del from used list */ /* reset element pointers */ /* don't forget to change the number of elements in the list */