From 66edcc856d89ffa33318443aa8680c9376772c4d Mon Sep 17 00:00:00 2001 From: Michael Scherer Date: Wed, 22 Feb 2017 17:27:43 +0100 Subject: Reorder the variable initialisation Found by coverity, since is_hot_tier is assigned to false, tier_type was always "hot" rather than "cold", making potential debugging likely harder. Change-Id: I49bce1c184548c5de5c00639e83fc3d2dbed90b2 BUG: 789278 Signed-off-by: Michael Scherer Reviewed-on: https://review.gluster.org/16717 Smoke: Gluster Build System Tested-by: Michael Scherer Reviewed-by: Shyamsundar Ranganathan NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System --- xlators/cluster/dht/src/tier.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'xlators/cluster/dht') diff --git a/xlators/cluster/dht/src/tier.c b/xlators/cluster/dht/src/tier.c index b13c41cd2ab..a8aebe00f69 100644 --- a/xlators/cluster/dht/src/tier.c +++ b/xlators/cluster/dht/src/tier.c @@ -2308,7 +2308,7 @@ tier_prepare_compact (migration_args_t *args, gfdb_time_t current_time) dht_conf_t *conf = NULL; gf_defrag_info_t *defrag = NULL; gf_tier_conf_t *tier_conf = NULL; - gf_boolean_t is_hot_tier = _gf_false; + gf_boolean_t is_hot_tier = args->is_hot_tier; int freq = 0; int ret = -1; const char *tier_type = is_hot_tier ? "hot" : "cold"; @@ -2321,8 +2321,6 @@ tier_prepare_compact (migration_args_t *args, gfdb_time_t current_time) tier_conf = &defrag->tier_conf; - is_hot_tier = args->is_hot_tier; - freq = is_hot_tier ? tier_get_freq_compact_hot (tier_conf) : tier_get_freq_compact_cold (tier_conf); -- cgit