diff options
author | Barak Sason <bsasonro@redhat.com> | 2019-08-18 11:02:32 +0300 |
---|---|---|
committer | Amar Tumballi <amarts@gmail.com> | 2019-08-21 14:01:02 +0000 |
commit | 5ce3ab86a67f99209dd0c533a9bd2a21bd06ef3d (patch) | |
tree | 565ef027bf341748513868a652e0691842cb99e3 /xlators | |
parent | 4c4eae13b474c32661eeae3734627d1a8494cf54 (diff) |
features/utime - fixing a coverity issue
-Modified op_errno init value to a non-negative value in order to avoid
using a negative value where it's not allowed.
-In the metod "STACK_UNWIND_STRICT" modified 3rd argument in order to
represnt the correct value to use (changed from -1 to ret).
CID: 1403650
Updates: bz#789278
Change-Id: I608031d5af13832e05e180e746b1b5280b54f559
Signed-off-by: Barak Sason <bsasonro@redhat.com>
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/features/utime/src/utime.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xlators/features/utime/src/utime.c b/xlators/features/utime/src/utime.c index e3a80b6ed48..3b8dadd3191 100644 --- a/xlators/features/utime/src/utime.c +++ b/xlators/features/utime/src/utime.c @@ -219,7 +219,7 @@ stub_err: int gf_utime_lookup(call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xdata) { - int op_errno = -1; + int op_errno = EINVAL; int ret = -1; VALIDATE_OR_GOTO(frame, err); @@ -250,7 +250,7 @@ gf_utime_lookup(call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *xdata) free_dict: dict_unref(xdata); err: - STACK_UNWIND_STRICT(lookup, frame, -1, op_errno, NULL, NULL, NULL, NULL); + STACK_UNWIND_STRICT(lookup, frame, ret, op_errno, NULL, NULL, NULL, NULL); return 0; } |