summaryrefslogtreecommitdiff
path: root/src/basic/list.h
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2022-06-28 18:37:34 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2022-07-02 12:46:16 +0200
commit64903d18dfd0344d5af3c0f8006b2e220de90091 (patch)
treef6ed4047b5d324adb513115fc9315ce25aaec5af /src/basic/list.h
parenta4d60b3e1c2097c3e23084aed401e3529b138df1 (diff)
downloadsystemd-64903d18dfd0344d5af3c0f8006b2e220de90091.tar.gz
basic/list: drop LIST_IS_EMPTY
This was a trivial wrapper that didn't provide any added value. With more complicated structures like strvs, hashmaps, sets, and arrays, it is possible to have an empty container. But in case of a list, the list is empty only when the head is missing. Also, we generally want the positive condition, so we replace many if (!LIST_IS_EMPTY(x)) with just if (x).
Diffstat (limited to 'src/basic/list.h')
-rw-r--r--src/basic/list.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/basic/list.h b/src/basic/list.h
index 58e83a6cb2..ca30039690 100644
--- a/src/basic/list.h
+++ b/src/basic/list.h
@@ -170,9 +170,6 @@
i != (p); \
i = i->name##_next ? i->name##_next : (head))
-#define LIST_IS_EMPTY(head) \
- (!(head))
-
/* Join two lists tail to head: a->b, c->d to a->b->c->d and de-initialise second list */
#define LIST_JOIN(name,a,b) \
do { \