From 87d5fb2ca50ab2812eabc7373216c45a5b4d16df Mon Sep 17 00:00:00 2001 From: Kartik_Burmee Date: Mon, 13 Nov 2017 16:48:26 +0530 Subject: glusterd: dead code coverity fix function: glusterd_volume_rebalance_use_rsp_dict problem: Execution cannot reach this statement: "goto out;" fix: removed the condition 'if(!ctx_dict)' and the corresponding action 'goto out;' because it will never be executed. reason: if the execution reaches this condition, then the value of '!ctx_dict' will always be false otherwise the execution will reach the 'out' label, skipping the execution of this conditional statement. html link of issue: https://download.gluster.org/pub/gluster/glusterfs/static-analysis/master/glusterfs-coverity/2017-11-10-0f524f07/html/1/99glusterd-utils.c.html#error Change-Id: I7ab6b2386bb01c54edd872f9f83bb8d2a4cd499f BUG: 789278 Signed-off-by: Kartik_Burmee --- xlators/mgmt/glusterd/src/glusterd-utils.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index ede2a9260a5..a50a294176b 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -10498,8 +10498,6 @@ glusterd_volume_rebalance_use_rsp_dict (dict_t *aggr, dict_t *rsp_dict) goto out; } - if (!ctx_dict) - goto out; ret = dict_get_str (ctx_dict, "volname", &volname); if (ret) { -- cgit