linked_list: Assert initialized list in linked_list_empty

This commit is contained in:
Kenny Levinsen 2020-08-04 14:25:07 +02:00
parent a844d77c21
commit 86efc98a5e

View file

@ -29,5 +29,6 @@ void linked_list_remove(struct linked_list *elem) {
} }
bool linked_list_empty(struct linked_list *list) { bool linked_list_empty(struct linked_list *list) {
assert(list->prev != NULL && list->next != NULL);
return list->next == list; return list->next == list;
} }