From 91ba8d02037cc27c7b44f1bfd492c42ccd0af042 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Mon, 24 May 2021 18:50:55 +0200 Subject: Added more tests and fixed dumb bugs typical --- libs/libc/list.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libs/libc/list.c') diff --git a/libs/libc/list.c b/libs/libc/list.c index 3f37478..a477285 100644 --- a/libs/libc/list.c +++ b/libs/libc/list.c @@ -61,7 +61,7 @@ NONNULL static struct node *list_add_node(struct list *list, struct node *node) struct node *list_last(struct list *list) { - if (list->head) + if (!list->head) return NULL; struct node *iterator = list->head; -- cgit v1.2.3