sys/queue.h: add LIST_FOREACH_SAFE to netbsd copy

This commit is contained in:
David van Moolenbroek 2011-12-23 19:05:09 +01:00
parent 3e46876a73
commit c21cdd3154

View file

@ -166,6 +166,11 @@ struct { \
(var); \
(var) = ((var)->field.le_next))
#define LIST_FOREACH_SAFE(var, head, field, tvar) \
for ((var) = LIST_FIRST((head)); \
(var) && ((tvar) = LIST_NEXT((var), field), 1); \
(var) = (tvar))
/*
* List access methods.
*/