summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendra@redhat.com>2018-09-07 14:00:59 -0400
committerAmar Tumballi <amarts@redhat.com>2018-09-11 01:35:23 +0000
commit5384787d41d33916521fdda194875a306f406eeb (patch)
treee3dd4f73a433ec181188ff30a6f9d3bf029d9633 /xlators
parenta9f3ef105f4c686608609ad473fe4968c15f10c9 (diff)
features/snapview-server: remove the ret variable
Used only once to store the return value of a function. Change-Id: Ib2b9db847b5f652ce46f220297d9c7c3503eaea2 fixes: #230 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/features/snapview-server/src/snapview-server.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/xlators/features/snapview-server/src/snapview-server.c b/xlators/features/snapview-server/src/snapview-server.c
index 664889b4a16..4d32eb0beef 100644
--- a/xlators/features/snapview-server/src/snapview-server.c
+++ b/xlators/features/snapview-server/src/snapview-server.c
@@ -323,7 +323,6 @@ svs_lookup_entry (xlator_t *this, loc_t *loc, struct iatt *buf,
svs_inode_t *inode_ctx = NULL;
glfs_object_t *parent_object = NULL;
uuid_t gfid = {0, };
- int ret = -1;
GF_VALIDATE_OR_GOTO ("snapview-server", this, out);
@@ -367,13 +366,12 @@ svs_lookup_entry (xlator_t *this, loc_t *loc, struct iatt *buf,
if (gf_uuid_is_null (loc->gfid) &&
gf_uuid_is_null (loc->inode->gfid)) {
- ret = svs_uuid_generate (this, gfid, parent_ctx->snapname,
- object->gfid);
+ if (svs_uuid_generate (this, gfid, parent_ctx->snapname,
+ object->gfid)) {
/*
* should op_errno be something else such as
* EINVAL or ESTALE?
*/
- if (ret) {
op_ret = -1;
*op_errno = EIO;
goto out;