linked_list: Assert initialized list in linked_list_empty
This commit is contained in:
parent
a844d77c21
commit
86efc98a5e
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue