From 5b467d177f296d09464a70ff047c24a5fc0bef42 Mon Sep 17 00:00:00 2001 From: karthik-us Date: Mon, 13 Jul 2020 16:37:30 +0530 Subject: 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 Updates: #1060 --- xlators/cluster/afr/src/afr.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'xlators/cluster') 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); -- cgit