summaryrefslogtreecommitdiffstats
path: root/xlators/storage/bd/src/bd.c
diff options
context:
space:
mode:
authorSunny Kumar <sunkumar@redhat.com>2018-08-23 18:22:09 +0530
committerAmar Tumballi <amarts@redhat.com>2018-08-24 07:08:21 +0000
commit9c49927e64b238cb077ae26c4e77bfe5bfc6a6bd (patch)
treea67de756495c36ca8b076224001dfa509feba31a /xlators/storage/bd/src/bd.c
parent52efadc48684a800ab93eac6d2d92f8f34495e53 (diff)
block : fix few coverity issue
Fixes 1128923, 1134020 and 1370936. updates: bz#789278 Change-Id: I2cadc09ffd0814a9390ba068006fa56704d3820d Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
Diffstat (limited to 'xlators/storage/bd/src/bd.c')
-rw-r--r--xlators/storage/bd/src/bd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/storage/bd/src/bd.c b/xlators/storage/bd/src/bd.c
index ade12d9092f..08dc35034f8 100644
--- a/xlators/storage/bd/src/bd.c
+++ b/xlators/storage/bd/src/bd.c
@@ -2230,7 +2230,8 @@ bd_zerofill(call_frame_t *frame, xlator_t *this, fd_t *fd, off_t offset,
return 0;
err:
- STACK_UNWIND_STRICT(zerofill, frame, -1, ret, NULL, NULL, NULL);
+ STACK_UNWIND_STRICT(zerofill, frame, -1, (ret == -1 ? 0 : ret),
+ NULL, NULL, NULL);
return 0;
}