summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorkarthik-us <ksubrahm@redhat.com>2020-07-13 16:37:30 +0530
committerkarthik-us <ksubrahm@redhat.com>2020-07-13 16:45:02 +0530
commit99bc72f41a25b00b422094f1664b7115fcd2bbd4 (patch)
treeebc248f5e53f66e1682e9badc4a9fdfccee1b711 /xlators
parent93598b2dd323e4ed20e3297bbab2a151c40a0595 (diff)
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')
-rw-r--r--xlators/cluster/afr/src/afr.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/xlators/cluster/afr/src/afr.c b/xlators/cluster/afr/src/afr.c
index a38489d9932..67e0a4d10be 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);