From e348b4df9bfd80be5c521bc4c76faf2693e90692 Mon Sep 17 00:00:00 2001 From: Mohammed Azhar Padariyakam Date: Thu, 21 Sep 2017 20:19:44 +0530 Subject: cli: fix Coverity warning DEADCODE in gf_cli_attach_tier() Issue : At condition "ret", the value of "ret" must be equal to 0. The condition "ret" cannot be true since the value is always 0. Hence, the execution cannot reach the statement "goto out" Solution : The never-true if-condition and its body has to be removed Fix : The always false if-condition and the dead code under this if-condition was removed. Change-Id: I5c038b8ec9abf9b2f06dcfd981904b9dca1a0094 BUG: 789278 Signed-off-by: Mohammed Azhar Padariyakam --- cli/src/cli-rpc-ops.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'cli/src') diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c index fcb451a3c08..1a92fb54ec9 100644 --- a/cli/src/cli-rpc-ops.c +++ b/cli/src/cli-rpc-ops.c @@ -4992,9 +4992,6 @@ gf_cli_attach_tier (call_frame_t *frame, xlator_t *this, dict = data; - if (ret) - goto out; - ret = cli_to_glusterd (&req, frame, gf_cli_attach_tier_cbk, (xdrproc_t) xdr_gf_cli_req, dict, GLUSTER_CLI_ATTACH_TIER, this, -- cgit