summaryrefslogtreecommitdiffstats
path: root/src/basic/list.h
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2021-06-17 09:12:06 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2021-08-10 08:32:27 +0200
commitbd335c961fed6982e5ad8c2322414ff33a46e92e (patch)
tree64e99642e7360a734da9fb07baf0fb5bbbe38d1f /src/basic/list.h
parentudev: rename is_device_busy() -> event_is_blocked() (diff)
downloadsystemd-bd335c961fed6982e5ad8c2322414ff33a46e92e.tar.xz
systemd-bd335c961fed6982e5ad8c2322414ff33a46e92e.zip
list: introduce LIST_FOREACH_BACKWARDS() macro and drop LIST_FOREACH_AFTER/BEFORE()
Diffstat (limited to 'src/basic/list.h')
-rw-r--r--src/basic/list.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/basic/list.h b/src/basic/list.h
index 256b7187c2..e488fff9f0 100644
--- a/src/basic/list.h
+++ b/src/basic/list.h
@@ -142,11 +142,8 @@
#define LIST_FOREACH_SAFE(name,i,n,head) \
for ((i) = (head); (i) && (((n) = (i)->name##_next), 1); (i) = (n))
-#define LIST_FOREACH_BEFORE(name,i,p) \
- for ((i) = (p)->name##_prev; (i); (i) = (i)->name##_prev)
-
-#define LIST_FOREACH_AFTER(name,i,p) \
- for ((i) = (p)->name##_next; (i); (i) = (i)->name##_next)
+#define LIST_FOREACH_BACKWARDS(name,i,p) \
+ for ((i) = (p); (i); (i) = (i)->name##_prev)
/* Iterate through all the members of the list p is included in, but skip over p */
#define LIST_FOREACH_OTHERS(name,i,p) \