aboutsummaryrefslogtreecommitdiff
path: root/queue.c
diff options
context:
space:
mode:
Diffstat (limited to 'queue.c')
-rw-r--r--queue.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/queue.c b/queue.c
index 622609e..8533691 100644
--- a/queue.c
+++ b/queue.c
@@ -53,10 +53,10 @@ queue_put(struct queue *queue, T data)
53bool 53bool
54queue_get(struct queue *queue, T *data) 54queue_get(struct queue *queue, T *data)
55{ 55{
56 if ( queue->head != NULL ) { 56 if ( queue->head ) {
57 struct queue_item *next = queue->head->next; 57 struct queue_item *next = queue->head->next;
58 58
59 if ( data != NULL ) { 59 if ( data ) {
60 *data = queue->head->data; 60 *data = queue->head->data;
61 } 61 }
62 free(queue->head); 62 free(queue->head);