chiark / gitweb /
cgtop: missing '-'
authorVáclav Pavlín <vpavlin@redhat.com>
Fri, 21 Sep 2012 10:04:02 +0000 (12:04 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 21 Sep 2012 14:04:25 +0000 (16:04 +0200)
Return codes in systemd are negated and
if (r < 0)  if (r == ENOENT)
        was never true.

src/cgtop/cgtop.c

index 3756328..9eb2d2f 100644 (file)
@@ -300,7 +300,7 @@ static int refresh_one(
 
         r = cg_enumerate_subgroups(controller, path, &d);
         if (r < 0) {
-                if (r == ENOENT)
+                if (r == -ENOENT)
                         return 0;
 
                 return r;