summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorSanju Rakonde <srakonde@redhat.com>2017-11-01 23:44:02 +0530
committerAtin Mukherjee <amukherj@redhat.com>2017-11-14 06:38:58 +0000
commitfa29170d768e77c6bedf220f09fe90aa1819cc99 (patch)
tree50fe7912c296311551a7c84d186a68275daf420c /xlators
parent3f8d118e48f11f448f35aca0c48ad40e0fd34f5b (diff)
glusterd: DEADCODE coverity fix
Problem: execution cannot enter into if block since the condition !address is always false. Fix: removing if block solves it. Change-Id: I47b4beca7bdc095900b46e3f5a5cb9629aa2a4d7 BUG: 789278 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-peer-utils.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-peer-utils.c b/xlators/mgmt/glusterd/src/glusterd-peer-utils.c
index fd88298d347..6652049a27e 100644
--- a/xlators/mgmt/glusterd/src/glusterd-peer-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-peer-utils.c
@@ -594,14 +594,6 @@ gd_add_friend_to_dict (glusterd_peerinfo_t *friend, dict_t *dict,
snprintf (key, sizeof (key), "%s.hostname", prefix);
address = cds_list_entry (&friend->hostnames, glusterd_peer_hostname_t,
hostname_list);
- if (!address) {
- ret = -1;
- gf_msg (this->name, GF_LOG_ERROR, 0,
- GD_MSG_PEER_ADDRESS_GET_FAIL,
- "Could not retrieve first "
- "address for peer");
- goto out;
- }
ret = dict_set_dynstr_with_alloc (dict, key, address->hostname);
if (ret) {
gf_msg (this->name, GF_LOG_ERROR, 0,