diff options
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/protocol/server/src/server-protocol.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/xlators/protocol/server/src/server-protocol.c b/xlators/protocol/server/src/server-protocol.c index 02aad32d07b..6faf0a5171b 100644 --- a/xlators/protocol/server/src/server-protocol.c +++ b/xlators/protocol/server/src/server-protocol.c @@ -7485,8 +7485,7 @@ protocol_server_interpret (xlator_t *this, transport_t *trans, peerinfo = &trans->peerinfo; switch (type) { case GF_OP_TYPE_FOP_REQUEST: - if ((op < 0) || - (op > GF_FOP_MAXVALUE)) { + if ((op < 0) || (op >= GF_FOP_MAXVALUE)) { gf_log (this->name, GF_LOG_ERROR, "invalid fop %"PRId32" from client %s", op, peerinfo->identifier); @@ -7503,7 +7502,7 @@ protocol_server_interpret (xlator_t *this, transport_t *trans, break; case GF_OP_TYPE_MOP_REQUEST: - if (op < 0 || op > GF_MOP_MAXVALUE) { + if ((op < 0) || (op >= GF_MOP_MAXVALUE)) { gf_log (this->name, GF_LOG_ERROR, "invalid mop %"PRId32" from client %s", op, peerinfo->identifier); @@ -7514,7 +7513,7 @@ protocol_server_interpret (xlator_t *this, transport_t *trans, break; case GF_OP_TYPE_CBK_REQUEST: - if (op < 0 || op > GF_CBK_MAXVALUE) { + if ((op < 0) || (op >= GF_CBK_MAXVALUE)) { gf_log (this->name, GF_LOG_ERROR, "invalid cbk %"PRId32" from client %s", op, peerinfo->identifier); |