aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/list.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/list.h')
-rw-r--r--src/utils/list.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utils/list.h b/src/utils/list.h
index 5298c26..aa62c08 100644
--- a/src/utils/list.h
+++ b/src/utils/list.h
@@ -76,8 +76,8 @@ static inline unsigned int dl_list_len(const struct dl_list *list)
dl_list_entry((list)->prev, type, member))
#define dl_list_for_each(item, list, type, member) \
- for (item = dl_list_first((list), type, member); \
- item && item != dl_list_entry((list), type, member); \
+ for (item = dl_list_entry((list)->next, type, member); \
+ &item->member != (list); \
item = dl_list_entry(item->member.next, type, member))
#define dl_list_for_each_safe(item, n, list, type, member) \