summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/lib/smbconf/smbconf_reg.c4
-rw-r--r--source3/registry/reg_init_smbconf.c7
2 files changed, 4 insertions, 7 deletions
diff --git a/source3/lib/smbconf/smbconf_reg.c b/source3/lib/smbconf/smbconf_reg.c
index c53d275938..ce38a20f3f 100644
--- a/source3/lib/smbconf/smbconf_reg.c
+++ b/source3/lib/smbconf/smbconf_reg.c
@@ -576,8 +576,8 @@ static WERROR smbconf_reg_init(struct smbconf_ctx *ctx, const char *path)
}
rpd(ctx)->open = false;
- if (!registry_init_smbconf(path)) {
- werr = WERR_REG_IO_FAILURE;
+ werr = registry_init_smbconf(path);
+ if (!W_ERROR_IS_OK(werr)) {
goto done;
}
diff --git a/source3/registry/reg_init_smbconf.c b/source3/registry/reg_init_smbconf.c
index a05da854cf..43a5be025d 100644
--- a/source3/registry/reg_init_smbconf.c
+++ b/source3/registry/reg_init_smbconf.c
@@ -67,10 +67,9 @@ done:
* for use in places where not the whole registry is needed,
* e.g. utils/net_conf.c and loadparm.c
*/
-bool registry_init_smbconf(const char *keyname)
+WERROR registry_init_smbconf(const char *keyname)
{
WERROR werr;
- bool ret = false;
DEBUG(10, ("registry_init_smbconf called\n"));
@@ -99,9 +98,7 @@ bool registry_init_smbconf(const char *keyname)
goto done;
}
- ret = true;
-
done:
regdb_close();
- return ret;
+ return werr;
}