aboutsummaryrefslogtreecommitdiff
path: root/queue.c
diff options
context:
space:
mode:
authorThomas Schmucker <ts@its1.de>2021-12-29 10:48:03 +0100
committerThomas Schmucker <ts@its1.de>2021-12-29 10:48:03 +0100
commit6ced2a50056acbf7caec404a1edfa3b07fa1ac5d (patch)
treeef9d4e6bcf9797b74e13ddbf943f424ac1d49664 /queue.c
parent87e013bc707860a6f299a2ee3866965a4fae12be (diff)
downloaddata-structures-6ced2a50056acbf7caec404a1edfa3b07fa1ac5d.tar.gz
data-structures-6ced2a50056acbf7caec404a1edfa3b07fa1ac5d.tar.bz2
data-structures-6ced2a50056acbf7caec404a1edfa3b07fa1ac5d.zip
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);