diff options
author | Kenny Levinsen <kl@kl.wtf> | 2020-08-04 14:25:07 +0200 |
---|---|---|
committer | Kenny Levinsen <kl@kl.wtf> | 2020-08-04 14:25:07 +0200 |
commit | 86efc98a5eab40631f6f02e6cdcfdd871ec08e9a (patch) | |
tree | 5282d937ee10fb9450fac4dbc99c8df5d7203952 /common | |
parent | a844d77c21661af3742c6090a3833452021f825c (diff) |
linked_list: Assert initialized list in linked_list_empty
Diffstat (limited to 'common')
-rw-r--r-- | common/linked_list.c | 1 |
1 files changed, 1 insertions, 0 deletions
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; } |