summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSunny Kumar <sunkumar@redhat.com>2017-10-31 11:24:04 +0530
committerSunny Kumar <sunkumar@redhat.com>2017-10-31 18:13:22 +0530
commitfd397e59d8856e4d5f1ccbec1baaedb71623951e (patch)
tree11a5f6171b008f20be96f065f41429def6f0a0c5
parent08000e3ab7effa2f09ba3f0334285c7ef7d2daab (diff)
snapshot: fix coverity issue 'DEADCODE'
Problem : Unreachable code at glusterd-snapshot.c:6718 Unreachable code at glusterd-snapshot.c:7352 FIx : Remove unreachable code At glusterd-snapshot.c:6718 in if condition the value of "snap" must be "NULL" to call glusterd_snap_remove() which is not possible here. Change-Id: Id865bde7c1474a9b9ed11c0ed614676b4e2443c6 BUG: 789278 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-snapshot.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot.c b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
index a8436e31c9f..e8ba32087f6 100644
--- a/xlators/mgmt/glusterd/src/glusterd-snapshot.c
+++ b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
@@ -6718,9 +6718,6 @@ glusterd_create_snap_object_for_clone (dict_t *dict, dict_t *rsp_dict)
out:
if (ret) {
- if (snap)
- glusterd_snap_remove (rsp_dict, snap,
- _gf_true, _gf_true, _gf_true);
snap = NULL;
}
@@ -7347,15 +7344,8 @@ glusterd_get_brick_lvm_details (dict_t *rsp_dict,
break;
token = strtok (buf, ":");
if (token != NULL) {
- while (token && token[0] == ' ')
+ while (token[0] == ' ')
token++;
- if (!token) {
- ret = -1;
- gf_msg (this->name, GF_LOG_ERROR, EINVAL,
- GD_MSG_INVALID_ENTRY,
- "Invalid vg entry");
- goto end;
- }
value = gf_strdup (token);
if (!value) {
ret = -1;