queue.c
/* Free all storage used by queue */
Free all storage used by queue
Free all storage used by queue
void q_free(struct list_head *l)
{
    if (!l)
        return;
    struct list_head *node, *safe;
    list_for_each_safe (node, safe, l) {
        list_del_init(node);
        q_release_element(list_entry(node, element_t, list));
    }
    free(l);
}
void q_free ( struct list_head * l ) { if ( ! l ) return ; struct list_head * node , * safe ; list_for_each_safe ( node , safe , l ) { list_del_init ( node ) ; q_release_element ( list_entry ( node , element_t , list ) ) ; } free ( l ) ; }
Free all storage used by queue
Free all storage used by queue