From b0749a900f214f11d89a34bd605b66f1b0ed1d19 Mon Sep 17 00:00:00 2001 From: Thomas Schmucker Date: Sun, 25 Oct 2020 13:50:34 +0100 Subject: fix: neue Klammerung --- queue.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'queue.c') diff --git a/queue.c b/queue.c index dab5bfb..622609e 100644 --- a/queue.c +++ b/queue.c @@ -43,8 +43,9 @@ queue_put(struct queue *queue, T data) else tmp->next = queue->tail; } - else + else { ERROR("out of memory"); + } } /* -->8-- */ @@ -96,8 +97,9 @@ main() queue_init(queue); - for ( int i = 0; i != 10; ++i ) + for ( int i = 0; i != 10; ++i ) { queue_put(queue, i); + } while ( !queue_empty(queue) ) { int i; -- cgit v1.3