projects
/
qemu
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8718e99
)
Add LIST_FOREACH_SAFE() definition
author
Juan Quintela
<quintela@redhat.com>
Tue, 1 Sep 2009 00:12:32 +0000
(
02:12
+0200)
committer
Anthony Liguori
<aliguori@us.ibm.com>
Wed, 9 Sep 2009 19:55:16 +0000
(14:55 -0500)
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
sys-queue.h
patch
|
blob
|
history
diff --git
a/sys-queue.h
b/sys-queue.h
index
cb6a4c8
..
eb89a4d
100644
(file)
--- a/
sys-queue.h
+++ b/
sys-queue.h
@@
-126,6
+126,11
@@
struct { \
(var); \
(var) = ((var)->field.le_next))
+#define LIST_FOREACH_SAFE(var, head, field, next_var) \
+ for ((var) = ((head)->lh_first); \
+ (var) && ((next_var) = ((var)->field.le_next), 1); \
+ (var) = (next_var))
+
/*
* List access methods.
*/