summaryrefslogtreecommitdiff
path: root/src/cgtop/cgtop.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-04-18 14:20:49 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-04-18 14:20:49 +0200
commit57ea45e11a3856a110cf195628f8b26cfe019a15 (patch)
tree900a35ca836367027c812d0829bf7cf2f508e9b1 /src/cgtop/cgtop.c
parent12777909c9cbf4217aecbbb38de97bac5252fc5b (diff)
downloadsystemd-57ea45e11a3856a110cf195628f8b26cfe019a15.tar.gz
systemd-57ea45e11a3856a110cf195628f8b26cfe019a15.tar.bz2
systemd-57ea45e11a3856a110cf195628f8b26cfe019a15.zip
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/cgtop/cgtop.c')
-rw-r--r--src/cgtop/cgtop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cgtop/cgtop.c b/src/cgtop/cgtop.c
index 7fe812d0ff..de5083bdde 100644
--- a/src/cgtop/cgtop.c
+++ b/src/cgtop/cgtop.c
@@ -134,7 +134,7 @@ static bool is_root_cgroup(const char *path) {
if (detect_container() > 0)
return false;
- return isempty(path) || path_equal(path, "/");
+ return empty_or_root(path);
}
static int process(