summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/server/src/server-handshake.c
diff options
context:
space:
mode:
authorGirjesh Rajoria <grajoria@redhat.com>2017-09-25 14:52:24 +0530
committerRaghavendra G <rgowdapp@redhat.com>2017-09-29 07:53:40 +0000
commit703728dd6f0431ba82821794ca6e9e8b43b35811 (patch)
tree3f4888d33b0f41634161cc7d499e68a650fa64d1 /xlators/protocol/server/src/server-handshake.c
parent2c124b5256bac5830d81552bfb4412620aa6cfb0 (diff)
xlators/protocol/server: Coverity Issue in server_setvolume()
Issue: Event result_independent_of_operands: "rsp->dict.dict_len > 4294967295U /* 2147483647 * 2U + 1U */" is always false regardless of the values of its operands. This occurs as the logical operand of "if". Fix: removed if block as the if condition is always false and statement inside block never executes. Change-Id: Ieaa968d6fbc9477428b4658ef725ace0db9b810a BUG: 789278 Signed-off-by: Girjesh Rajoria <grajoria@redhat.com>
Diffstat (limited to 'xlators/protocol/server/src/server-handshake.c')
-rw-r--r--xlators/protocol/server/src/server-handshake.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/xlators/protocol/server/src/server-handshake.c b/xlators/protocol/server/src/server-handshake.c
index 7660d41..c40409e 100644
--- a/xlators/protocol/server/src/server-handshake.c
+++ b/xlators/protocol/server/src/server-handshake.c
@@ -904,14 +904,6 @@ fail:
rsp->op_ret = 0;
rsp->dict.dict_len = dict_serialized_length (reply);
- if (rsp->dict.dict_len > UINT_MAX) {
- gf_msg_debug ("server-handshake", 0, "failed to get serialized"
- " length of reply dict");
- op_ret = -1;
- op_errno = EINVAL;
- rsp->dict.dict_len = 0;
- }
-
if (rsp->dict.dict_len) {
rsp->dict.dict_val = GF_CALLOC (1, rsp->dict.dict_len,
gf_server_mt_rsp_buf_t);