diff options
author | Noel Power <noel.power@suse.com> | 2019-07-03 11:34:19 +0000 |
---|---|---|
committer | Noel Power <npower@samba.org> | 2019-07-08 09:30:09 +0000 |
commit | 17ce70d6d9cb40afc38e41af3f0fd9ed052fb8a2 (patch) | |
tree | 36cd8ac85e3fd8314d6062bc4a18e6b877fb9712 /lib | |
parent | d759f4aa4b8e660e0745cfed30eb291d9484291d (diff) | |
download | samba-17ce70d6d9cb40afc38e41af3f0fd9ed052fb8a2.tar.gz |
lib/param: clang: Fix Value stored is never read
Fixes:
lib/param/loadparm.c:2164:2: warning: Value stored to 'bRetval' is never read <--[clang]
bRetval = false;
^ ~~~~~
1 warning generated.
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/param/loadparm.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/param/loadparm.c b/lib/param/loadparm.c index 239d671803f..26b61789b3f 100644 --- a/lib/param/loadparm.c +++ b/lib/param/loadparm.c @@ -2161,15 +2161,14 @@ static bool do_section(const char *pszSectionName, void *userdata) isglobal = ((strwicmp(pszSectionName, GLOBAL_NAME) == 0) || (strwicmp(pszSectionName, GLOBAL_NAME2) == 0)); - bRetval = false; - /* if we've just struck a global section, note the fact. */ lp_ctx->bInGlobalSection = isglobal; /* check for multiple global sections */ if (lp_ctx->bInGlobalSection) { DEBUG(4, ("Processing section \"[%s]\"\n", pszSectionName)); - return true; + bRetval = true; + goto out; } /* if we have a current service, tidy it up before moving on */ @@ -2188,10 +2187,11 @@ static bool do_section(const char *pszSectionName, void *userdata) pszSectionName)) == NULL) { DEBUG(0, ("Failed to add a new service\n")); - return false; + bRetval = false; + goto out; } } - +out: return bRetval; } |