]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
config: remove dead code in config_validate_namespaces()
authorKamalesh Babulal <kamalesh.babulal@oracle.com>
Fri, 8 Jul 2022 16:28:49 +0000 (10:28 -0600)
committerTom Hromatka <tom.hromatka@oracle.com>
Fri, 8 Jul 2022 16:28:54 +0000 (10:28 -0600)
Remove the logically dead code, reported by the Coverity tool:

CID 258280 (#1 of 1): Logically dead code (DEADCODE)dead_error_begin:
Execution cannot reach this statement: last_errno = *__errno_locat....

cg_mount_table[i].mount.path can never be NULL, so remove that check in
the config_validate_namespaces().

Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
src/config.c

index 841ef02d001a6bc2d0e4efe206018e70527c6a65..400f8b7ebb2458b479ef2b4ca1a48981f3612b48 100644 (file)
@@ -845,12 +845,6 @@ static int config_validate_namespaces(void)
                 */
                mount_path = cg_mount_table[i].mount.path;
 
-               if (!mount_path) {
-                       last_errno = errno;
-                       error = ECGOTHER;
-                       goto out_error;
-               }
-
                /*
                 * Setup the namespace for the subsystems having the same
                 * mount point.