llist: add PA_LLIST_FOREACH_SAFE macro for iteration that allows deleting

This commit is contained in:
Lennart Poettering 2009-08-26 20:05:48 +02:00
parent 368c3e3f90
commit 4e1298d7c7

View file

@ -107,4 +107,7 @@
#define PA_LLIST_FOREACH(i,head) \
for (i = (head); i; i = i->next)
#define PA_LLIST_FOREACH_SAFE(i,n,head) \
for (i = (head); i && ((n = i->next), 1); i = n)
#endif