summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-04-18 14:20:49 +0200
committerSven Eden <yamakuzure@gmx.net>2018-08-24 16:47:08 +0200
commite5e0c80fdfa8861931df799574d5a60c96b6aa13 (patch)
tree3ff055d308feb83a85c3d8a2edd0eb9ebcfd42a4 /src/core
parentd1dbf40d47cfa883c4c9fa264dfd84cd57a03b85 (diff)
util-lib: introduce new empty_or_root() helper (#8746)
We check the same condition at various places. Let's add a trivial, common helper for this, and use it everywhere. It's not going to make things much faster or much shorter, but I think a lot more readable
Diffstat (limited to 'src/core')
-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 c52bdbf15..9b69fa82e 100644
--- a/src/core/cgroup.c
+++ b/src/core/cgroup.c
@@ -40,7 +40,7 @@ bool manager_owns_root_cgroup(Manager *m) {
if (detect_container() > 0)
return false;
- return isempty(m->cgroup_root) || path_equal(m->cgroup_root, "/");
+ return empty_or_root(m->cgroup_root);
}
#if 0 /// UNNEEDED by elogind