projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d1f6b1b
)
list: properly skip over first item in LIST_FOREACH_OTHERS
author
Lennart Poettering
<lennart@poettering.net>
Wed, 28 Jan 2015 13:03:31 +0000
(14:03 +0100)
committer
Lennart Poettering
<lennart@poettering.net>
Wed, 28 Jan 2015 13:04:23 +0000
(14:04 +0100)
src/shared/list.h
patch
|
blob
|
history
diff --git
a/src/shared/list.h
b/src/shared/list.h
index
7ed6318
..
2939216
100644
(file)
--- a/
src/shared/list.h
+++ b/
src/shared/list.h
@@
-144,6
+144,8
@@
(i) = (p); \
while ((i) && (i)->name##_prev) \
(i) = (i)->name##_prev; \
+ if ((i) == (p)) \
+ (i) = (p)->name##_next; \
}); \
(i); \
(i) = (i)->name##_next == (p) ? (p)->name##_next : (i)->name##_next)