diff options
| author | Vijay Bellur <vbellur@redhat.com> | 2018-08-21 14:51:11 -0700 | 
|---|---|---|
| committer | Amar Tumballi <amarts@redhat.com> | 2018-08-23 03:44:25 +0000 | 
| commit | 70181c8b4215e34dfff35fc4918d0e9b5256f32d (patch) | |
| tree | c9f0ea3ca134190d39d34ab038c1cc718aea83fd | |
| parent | 101723cc466a069e5e19b31378305255522f7e84 (diff) | |
features/leases: Initialize op_errno in leases_open()
Addresses CID: 1356483 by getting rid of an unessential assignment for
op_errno
Change-Id: I2327ac17b2875b4dd5f79b76be59e2c8e570b031
updates: bz#789278
Signed-off-by: Vijay Bellur <vbellur@redhat.com>
| -rw-r--r-- | xlators/features/leases/src/leases.c | 3 | 
1 files changed, 1 insertions, 2 deletions
diff --git a/xlators/features/leases/src/leases.c b/xlators/features/leases/src/leases.c index cbcbff73022..0e1a089ad59 100644 --- a/xlators/features/leases/src/leases.c +++ b/xlators/features/leases/src/leases.c @@ -30,7 +30,7 @@ leases_open (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags,               fd_t *fd, dict_t *xdata)  {          uint32_t         fop_flags       = 0; -        int32_t          op_errno        = 0; +        int32_t          op_errno        = EINVAL;          int              ret             = 0;          lease_fd_ctx_t  *fd_ctx          = NULL;          char            *lease_id        = NULL; @@ -87,7 +87,6 @@ err:                  GF_FREE (fd_ctx);          } -        op_errno = (op_errno == -1) ? errno : op_errno;          STACK_UNWIND_STRICT (open, frame, -1, op_errno, NULL, NULL);          return 0;  }  | 
