summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
Diffstat (limited to 'xlators')
-rw-r--r--xlators/cluster/dht/src/dht-common.h2
-rw-r--r--xlators/cluster/dht/src/tier-common.c20
-rw-r--r--xlators/encryption/crypt/src/crypt.c2
3 files changed, 7 insertions, 17 deletions
diff --git a/xlators/cluster/dht/src/dht-common.h b/xlators/cluster/dht/src/dht-common.h
index d396c1d8173..3d6fbb1fd79 100644
--- a/xlators/cluster/dht/src/dht-common.h
+++ b/xlators/cluster/dht/src/dht-common.h
@@ -88,7 +88,7 @@ struct dht_layout {
int gen;
int type;
int ref; /* use with dht_conf_t->layout_lock */
- gf_boolean_t search_unhashed;
+ uint32_t search_unhashed;
struct {
int err; /* 0 = normal
-1 = dir exists and no xattr
diff --git a/xlators/cluster/dht/src/tier-common.c b/xlators/cluster/dht/src/tier-common.c
index 2f30ef67fe4..c6b54d21d8e 100644
--- a/xlators/cluster/dht/src/tier-common.c
+++ b/xlators/cluster/dht/src/tier-common.c
@@ -1089,28 +1089,18 @@ tier_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;
+ }
+ } else {
- case _gf_false:
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) {
diff --git a/xlators/encryption/crypt/src/crypt.c b/xlators/encryption/crypt/src/crypt.c
index 0dd076bd897..9e5bcf79c30 100644
--- a/xlators/encryption/crypt/src/crypt.c
+++ b/xlators/encryption/crypt/src/crypt.c
@@ -3682,7 +3682,7 @@ static int32_t __crypt_ftruncate_done(call_frame_t *frame,
STACK_UNWIND_STRICT(ftruncate,
frame,
- local->op_ret < 0 ? -1 : 0,
+ ((local->op_ret < 0) ? -1 : 0),
local->op_errno,
&local->prebuf,
&local->postbuf,