diff options
author | Sanju Rakonde <srakonde@redhat.com> | 2018-08-28 11:03:47 +0530 |
---|---|---|
committer | Atin Mukherjee <amukherj@redhat.com> | 2018-08-29 12:34:18 +0000 |
commit | 789a5a3d3cbad9c594fd2a94924ec0a2040c27ad (patch) | |
tree | d8d832c2c28930725303dd9a8196d79e4d93f2b5 /xlators/mgmt/glusterd/src/glusterd-brick-ops.c | |
parent | 2a7ce9ecc919e390208bc3449f6c5fa320b7efe4 (diff) | |
download | glusterfs-789a5a3d3cbad9c594fd2a94924ec0a2040c27ad.tar.gz glusterfs-789a5a3d3cbad9c594fd2a94924ec0a2040c27ad.tar.xz glusterfs-789a5a3d3cbad9c594fd2a94924ec0a2040c27ad.zip |
glusterd: Fix coverity issues
This patch fixes CID's 1395250, 1395252
1395250 - Unintialized variable
1395252 - Out of bounds access
updates: bz#789278
Change-Id: Icf646364b14d48fa2bd82ea78ca5cdb5c684355f
Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-brick-ops.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-brick-ops.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c index 991a4d2b59..5591070f32 100644 --- a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c +++ b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c @@ -2954,7 +2954,7 @@ glusterd_op_remove_brick (dict_t *dict, char **op_errstr) } while ( i <= count) { - snprintf (key, 256, "brick%d", i); + snprintf (key, sizeof(key), "brick%d", i); ret = dict_get_str (dict, key, &brick); if (ret) { gf_msg (this->name, GF_LOG_ERROR, errno, |