From f179d09326c519abb1868de79598719b93219544 Mon Sep 17 00:00:00 2001 From: ShyamsundarR Date: Mon, 15 Oct 2018 20:50:26 -0400 Subject: glusterfsd: Fix coverity issues around unused values This patch fixes, CID: 1274064, 1274232 The fix is to not add into the return dict the throughput and time values on error computing the same. The pattern applied is the same as when an error occurs during adding either the throughput or the time value to the dict. Change-Id: I33e21e75efbc691f18b818934ef3bf70dd075097 Updates: bz#789278 Signed-off-by: ShyamsundarR --- glusterfsd/src/glusterfsd-mgmt.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'glusterfsd') diff --git a/glusterfsd/src/glusterfsd-mgmt.c b/glusterfsd/src/glusterfsd-mgmt.c index c1f85bf88a7..4339842768f 100644 --- a/glusterfsd/src/glusterfsd-mgmt.c +++ b/glusterfsd/src/glusterfsd-mgmt.c @@ -416,6 +416,8 @@ glusterfs_handle_translator_info_get(rpcsvc_request_t *req) ret = glusterfs_volume_top_write_perf( blk_size, blk_count, xlator_req.name, &throughput, &time); } + if (ret) + goto cont; ret = dict_set_double(dict, "time", time); if (ret) goto cont; -- cgit