From 86efc98a5eab40631f6f02e6cdcfdd871ec08e9a Mon Sep 17 00:00:00 2001 From: Kenny Levinsen Date: Tue, 4 Aug 2020 14:25:07 +0200 Subject: linked_list: Assert initialized list in linked_list_empty --- common/linked_list.c | 1 + 1 file changed, 1 insertion(+) diff --git a/common/linked_list.c b/common/linked_list.c index b853289..cb3e0a8 100644 --- a/common/linked_list.c +++ b/common/linked_list.c @@ -29,5 +29,6 @@ void linked_list_remove(struct linked_list *elem) { } bool linked_list_empty(struct linked_list *list) { + assert(list->prev != NULL && list->next != NULL); return list->next == list; } -- cgit v1.2.3