aboutsummaryrefslogtreecommitdiff
path: root/queue.c
diff options
context:
space:
mode:
authorThomas Schmucker <ts@its1.de>2021-12-29 10:49:19 +0100
committerThomas Schmucker <ts@its1.de>2021-12-29 10:49:19 +0100
commit5e696c74c9649b0e54133d46a3ae92e5ce0632fb (patch)
treeef9d4e6bcf9797b74e13ddbf943f424ac1d49664 /queue.c
parenta9fecebe13be05c15a5adf5a6fcefacb73d0d035 (diff)
parent6ced2a50056acbf7caec404a1edfa3b07fa1ac5d (diff)
downloaddata-structures-5e696c74c9649b0e54133d46a3ae92e5ce0632fb.tar.gz
data-structures-5e696c74c9649b0e54133d46a3ae92e5ce0632fb.tar.bz2
data-structures-5e696c74c9649b0e54133d46a3ae92e5ce0632fb.zip
Merge branch 'feat/remove-null-checks'
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);