diff options
author | karthik-us <ksubrahm@redhat.com> | 2020-07-13 16:37:30 +0530 |
---|---|---|
committer | gluster-ant <bugzilla-bot@gluster.org> | 2020-07-13 16:37:30 +0530 |
commit | 5b467d177f296d09464a70ff047c24a5fc0bef42 (patch) | |
tree | ebc248f5e53f66e1682e9badc4a9fdfccee1b711 /xlators/cluster | |
parent | c808f4bda2839bbe0691215a1e69efff36f8a7cd (diff) | |
download | glusterfs-5b467d177f296d09464a70ff047c24a5fc0bef42.tar.gz glusterfs-5b467d177f296d09464a70ff047c24a5fc0bef42.tar.xz glusterfs-5b467d177f296d09464a70ff047c24a5fc0bef42.zip |
cluster/afr: Fixing coverity issues
Fixing the unchecked return value issues reported by coverity scan
CID: 1400734
CID: 1400750
Change-Id: I3c953df9ade4a1548e41e18018edb1b041f7e15e
Signed-off-by: karthik-us <ksubrahm@redhat.com>
Updates: #1060
Diffstat (limited to 'xlators/cluster')
-rw-r--r-- | xlators/cluster/afr/src/afr.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/xlators/cluster/afr/src/afr.c b/xlators/cluster/afr/src/afr.c index a38489d993..67e0a4d10b 100644 --- a/xlators/cluster/afr/src/afr.c +++ b/xlators/cluster/afr/src/afr.c @@ -168,7 +168,8 @@ reconfigure(xlator_t *this, dict_t *options) bool, out); GF_OPTION_RECONF("data-self-heal", data_self_heal, options, str, out); - gf_string2boolean(data_self_heal, &priv->data_self_heal); + if (gf_string2boolean(data_self_heal, &priv->data_self_heal) == -1) + goto out; GF_OPTION_RECONF("entry-self-heal", priv->entry_self_heal, options, bool, out); @@ -485,7 +486,8 @@ init(xlator_t *this) GF_OPTION_INIT("heal-wait-queue-length", priv->heal_wait_qlen, uint32, out); GF_OPTION_INIT("data-self-heal", data_self_heal, str, out); - gf_string2boolean(data_self_heal, &priv->data_self_heal); + if (gf_string2boolean(data_self_heal, &priv->data_self_heal) == -1) + goto out; GF_OPTION_INIT("data-self-heal-algorithm", data_self_heal_algorithm, str, out); |