summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-01-28 14:03:31 +0100
committerLennart Poettering <lennart@poettering.net>2015-01-28 14:04:23 +0100
commitcdda4aa8d20c2679cc937d40e793abe7806f17cb (patch)
treeda590ee5e06fd6b670cb600ca7ea332daeb6c362 /src/shared
parentd1f6b1b455cd15dec3948267d5fff570d5597309 (diff)
list: properly skip over first item in LIST_FOREACH_OTHERS
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/list.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/shared/list.h b/src/shared/list.h
index 7ed63188ba..2939216adb 100644
--- 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)