chiark
/
gitweb
/
~ianmdlvl
/
elogind.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 7ed63188ba8e6da903ba5457c9385da9e4095058..2939216adb60ef0aa43015421d3c9631de206a6e 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; \
(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)
}); \
(i); \
(i) = (i)->name##_next == (p) ? (p)->name##_next : (i)->name##_next)