chaos_queue.c
void chaos_queue_destroy(chaos_queue* queue)
{
    queue_entry* walk;
    queue_entry* dead;
    
    /* Sanity check */
    if(queue == NULL)
        return;
    
    walk = queue->head;
    while(walk != NULL) {
        dead = walk;
        walk = walk->next;
        
        free(dead);
    }
    
    chaos_queue_init(queue);
}
/* Clears out all contents of a queue */
Clears out all contents of a queue
Clears out all contents of a queue
void chaos_queue_destroy(chaos_queue* queue)
{
    queue_entry* walk;
    queue_entry* dead;
    if(queue == NULL)
        return;
    walk = queue->head;
    while(walk != NULL) {
        dead = walk;
        walk = walk->next;
        free(dead);
    }
    chaos_queue_init(queue);
}
void chaos_queue_destroy ( chaos_queue * queue ) { queue_entry * walk ; queue_entry * dead ; if ( queue == NULL ) return ; walk = queue -> head ; while ( walk != NULL ) { dead = walk ; walk = walk -> next ; free ( dead ) ; } chaos_queue_init ( queue ) ; }
Clears out all contents of a queue
Clears out all contents of a queue
/* Sanity check */