Skip to content

Commit

Permalink
use LIST_FIRST/LIST_NEXT for LIST_FOREACH
Browse files Browse the repository at this point in the history
  • Loading branch information
yamt committed Jul 26, 2023
1 parent 411602d commit 7d030fc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/list.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ void list_insert_tail(struct list_head *h, void *elem, struct list_entry *e);
}

#define LIST_FOREACH(VAR, HEAD, NAME) \
for (VAR = (HEAD)->first; VAR != NULL; VAR = (VAR)->NAME.next)
for (VAR = LIST_FIRST(HEAD); VAR != NULL; VAR = LIST_NEXT(VAR, NAME))

#if defined(toywasm_typeof)
#define CHECK_TYPE(a, b) \
Expand Down

0 comments on commit 7d030fc

Please sign in to comment.