summaryrefslogtreecommitdiff
path: root/src/core/cgroup.c
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/core/cgroup.c
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/core/cgroup.c')
-rw-r--r--src/core/cgroup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/cgroup.c b/src/core/cgroup.c
index 25707fce64..0fce812b40 100644
--- a/src/core/cgroup.c
+++ b/src/core/cgroup.c
@@ -1689,7 +1689,7 @@ static bool unit_get_needs_bpf_foreign_program(Unit *u) {
if (!c)
return false;
- return !LIST_IS_EMPTY(c->bpf_foreign_programs);
+ return !!c->bpf_foreign_programs;
}
static bool unit_get_needs_socket_bind(Unit *u) {