On Tue, May 5, 2015 at 11:13 AM, Neil Roberts wrote:
> Jason Ekstrand writes:
>
>> +#define list_for_each_entry(type, pos, head, member)\
>> + for (type *pos = container_of((head)->next, pos, member);\
>> + &pos->member != (head);
Jason Ekstrand writes:
> +#define list_for_each_entry(type, pos, head, member)\
> + for (type *pos = container_of((head)->next, pos, member);\
> + &pos->member != (head); \
> + pos = container_of(pos->member.next, p
---
src/util/list.h | 33 +
1 file changed, 33 insertions(+)
diff --git a/src/util/list.h b/src/util/list.h
index 9dcf671..6144b0c 100644
--- a/src/util/list.h
+++ b/src/util/list.h
@@ -141,6 +141,39 @@ static inline void list_delinit(struct list_head *item)
#defi