diff options
author | Shreyas Siravara <sshreyas@fb.com> | 2017-12-05 06:51:24 -0800 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2017-12-05 20:35:19 +0000 |
commit | ee20190a3a6e36b97c4914e0fa486017e72b0375 (patch) | |
tree | 2aeff7bf110c06763ef6dd22586b70dc015bb3e1 | |
parent | 69da9aa3c784ff3d28671d097395e3f6c7542a65 (diff) |
cluster/dht: Fix build error due to switch statement on a boolean
Change-Id: Idf672b435e389baada732f609398404479306909
BUG: 1520974
-rw-r--r-- | xlators/cluster/dht/src/dht-common.c | 21 |
1 files changed, 5 insertions, 16 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index f5411f406d9..9d0e30ae461 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -6040,28 +6040,17 @@ dht_statfs_cbk (call_frame_t *frame, void *cookie, xlator_t *this, } local->op_ret = 0; - switch (local->quota_deem_statfs) { - case _gf_true: - if (event == _gf_true) + if (local->quota_deem_statfs) { + if (event == _gf_true) { action = qdstatfs_action_COMPARE; - else + } else { action = qdstatfs_action_NEGLECT; - break; - - case _gf_false: + } + } else { if (event == _gf_true) { action = qdstatfs_action_REPLACE; local->quota_deem_statfs = _gf_true; } - break; - - default: - gf_msg (this->name, GF_LOG_ERROR, 0, - DHT_MSG_INVALID_VALUE, - "Encountered third " - "value for boolean variable %d", - local->quota_deem_statfs); - break; } if (local->quota_deem_statfs) { |