cg_get_path: Removed unreachable statement
authorreverendhomer <mk.43.ecko@gmail.com>
Thu, 3 Sep 2015 08:34:47 +0000 (11:34 +0300)
committerreverendhomer <mk.43.ecko@gmail.com>
Thu, 3 Sep 2015 08:34:47 +0000 (11:34 +0300)
controller cannot be NULL because if-statement in L509 has return
Coverity #1322379

src/basic/cgroup-util.c

index 4fcff87..0ebe570 100644 (file)
@@ -540,10 +540,7 @@ int cg_get_path(const char *controller, const char *path, const char *suffix, ch
         else {
                 const char *dn;
 
-                if (controller)
-                        dn = controller_to_dirname(controller);
-                else
-                        dn = NULL;
+                dn = controller_to_dirname(controller);
 
                 r = join_path_legacy(dn, path, suffix, fs);
         }