summaryrefslogtreecommitdiffstats
path: root/glusterfsd
diff options
context:
space:
mode:
authorLalatendu Mohanty <lmohanty@redhat.com>2014-01-14 23:50:51 +0530
committerVijay Bellur <vbellur@redhat.com>2014-01-18 08:47:17 -0800
commit1ffc3ac9639e25c91ac26488b648d5523becb08e (patch)
tree4152fc4ee17f3c535ec3b8fcc8b384538c333d38 /glusterfsd
parent63638748d744377d899e9ee0b5e7831d7c1c2496 (diff)
core: Coverity issue "Use of uninitialized scalar variable"
Issue: 1. In "unlink (export_path)" "export_path" might contain an arbitrary value left from earlier computations. 2. In "(msg[0] != '\0')" msg might contain an arbitrary value Change-Id: Icca8f557fd6b5e046dff1d5a84a72061975868d0 BUG: 789278 Signed-off-by: Lalatendu Mohanty <lmohanty@redhat.com> Reviewed-on: http://review.gluster.org/6701 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'glusterfsd')
-rw-r--r--glusterfsd/src/glusterfsd-mgmt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/glusterfsd/src/glusterfsd-mgmt.c b/glusterfsd/src/glusterfsd-mgmt.c
index 0484779..de2829d 100644
--- a/glusterfsd/src/glusterfsd-mgmt.c
+++ b/glusterfsd/src/glusterfsd-mgmt.c
@@ -365,7 +365,7 @@ glusterfs_volume_top_write_perf (uint32_t blk_size, uint32_t blk_count,
{
int32_t fd = -1;
int32_t input_fd = -1;
- char export_path[PATH_MAX];
+ char export_path[PATH_MAX] = {0,};
char *buf = NULL;
int32_t iter = 0;
int32_t ret = -1;
@@ -448,7 +448,7 @@ glusterfs_volume_top_read_perf (uint32_t blk_size, uint32_t blk_count,
int32_t fd = -1;
int32_t input_fd = -1;
int32_t output_fd = -1;
- char export_path[PATH_MAX];
+ char export_path[PATH_MAX] = {0,};
char *buf = NULL;
int32_t iter = 0;
int32_t ret = -1;