Skip to content

Commit

Permalink
Merge pull request #17 from lightpanda-io/has_list
Browse files Browse the repository at this point in the history
has_list: check cur is NULL
  • Loading branch information
krichprollsch authored May 2, 2024
2 parents 1b8b1d9 + bb4117f commit 3677430
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/utils/list.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ static inline bool list_has(struct list_entry *head, struct list_entry *ent)
{
struct list_entry *cur = head;
do {
if (cur == NULL) {
return false;
}
if (cur == ent) {
return true;
}
Expand Down

0 comments on commit 3677430

Please sign in to comment.