summaryrefslogtreecommitdiffstats
path: root/xlators/storage/posix
diff options
context:
space:
mode:
authoryatipadia <ypadia@redhat.com>2019-10-04 18:21:42 +0530
committerSunny Kumar <sunkumar@redhat.com>2019-10-11 09:37:39 +0000
commit1004f959ca3b3697f2759f929ca4c11537f6c488 (patch)
treeed08fc579faa60227a92ee256afd6f1366ff5919 /xlators/storage/posix
parent332bac01dd15aaad53ba144c80edca551fe58e11 (diff)
POSIX/xlators: Unused and unchecked value coverity issue
This patch addresses CID-1274094 and CID-1382354 Problem(1): "ret" was assigned a value which was never used, it was overwritten by 0 and hence has no use. Problem(2): function was called without checking the return value. Solution(1): Removed the assignment and just called the function whose value was being written in ret. Solution(2): There was no need to check for the return value as at the end 0 is returned, so typecasted the return value as void. Change-Id: Iefd0e9000c466ef2428c754c31370263bf1ca0d0 updates: bz#789278
Diffstat (limited to 'xlators/storage/posix')
-rw-r--r--xlators/storage/posix/src/posix-helpers.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xlators/storage/posix/src/posix-helpers.c b/xlators/storage/posix/src/posix-helpers.c
index d416947403a..8cb66a7f9f1 100644
--- a/xlators/storage/posix/src/posix-helpers.c
+++ b/xlators/storage/posix/src/posix-helpers.c
@@ -364,7 +364,7 @@ _posix_get_marker_all_contributions(posix_xattr_filler_t *filler)
while (remaining_size > 0) {
len = snprintf(key, sizeof(key), "%s", list + list_offset);
if (fnmatch(marker_contri_key, key, 0) == 0) {
- ret = _posix_xattr_get_set_from_backend(filler, key);
+ (void)_posix_xattr_get_set_from_backend(filler, key);
}
remaining_size -= (len + 1);
list_offset += (len + 1);
@@ -1784,7 +1784,7 @@ posix_gfid_heal(xlator_t *this, const char *path, loc_t *loc, dict_t *xattr_req)
}
}
- posix_gfid_set(this, path, loc, xattr_req, GF_CLIENT_PID_MAX, &ret);
+ (void)posix_gfid_set(this, path, loc, xattr_req, GF_CLIENT_PID_MAX, &ret);
return 0;
}