chiark / gitweb /
path-util: fix more path_is_mount e792e890f fallout
authorLennart Poettering <lennart@poettering.net>
Tue, 7 Apr 2015 14:03:45 +0000 (16:03 +0200)
committerSven Eden <yamakuzure@gmx.net>
Tue, 14 Mar 2017 06:51:56 +0000 (07:51 +0100)
src/shared/cgroup-util.c

index 99d06540a1579df953bd4a88c5d84a242e718beb..2e2984a35c372451de58ba1150b56d0b9b4a7912 100644 (file)
@@ -486,8 +486,10 @@ int cg_get_path(const char *controller, const char *path, const char *suffix, ch
                 int r;
 
                 r = path_is_mount_point("/sys/fs/cgroup", false);
                 int r;
 
                 r = path_is_mount_point("/sys/fs/cgroup", false);
-                if (r <= 0)
-                        return r < 0 ? r : -ENOENT;
+                if (r < 0)
+                        return r;
+                if (r == 0)
+                        return -ENOENT;
 
                 /* Cache this to save a few stat()s */
                 good = true;
 
                 /* Cache this to save a few stat()s */
                 good = true;