projects
/
profile
/
ivi
/
pulseaudio-panda.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
368c3e3
)
llist: add PA_LLIST_FOREACH_SAFE macro for iteration that allows deleting
author
Lennart Poettering
<lennart@poettering.net>
Wed, 26 Aug 2009 18:05:48 +0000
(20:05 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Wed, 26 Aug 2009 18:05:48 +0000
(20:05 +0200)
src/pulsecore/llist.h
patch
|
blob
|
history
diff --git
a/src/pulsecore/llist.h
b/src/pulsecore/llist.h
index
58b51c6
..
27f174a
100644
(file)
--- a/
src/pulsecore/llist.h
+++ b/
src/pulsecore/llist.h
@@
-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