From: Kamalesh Babulal Date: Fri, 8 Jul 2022 16:28:49 +0000 (-0600) Subject: config: remove dead code in config_validate_namespaces() X-Git-Tag: v3.0~57 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aa758d5edc8d043a1e4092ce1ef830bcce3603ae;p=thirdparty%2Flibcgroup.git config: remove dead code in config_validate_namespaces() 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 Signed-off-by: Tom Hromatka --- diff --git a/src/config.c b/src/config.c index 841ef02d..400f8b7e 100644 --- a/src/config.c +++ b/src/config.c @@ -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.