From 5ce3ab86a67f99209dd0c533a9bd2a21bd06ef3d Mon Sep 17 00:00:00 2001 From: Barak Sason Date: Sun, 18 Aug 2019 11:02:32 +0300 Subject: 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 --- xlators/features/utime/src/utime.c | 4 ++-- 1 file 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; } -- cgit