From 47038fdcd233fc959401a37d6ca87b5bc45cec9e Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Sun, 13 Apr 2008 15:25:47 +0200 Subject: [PATCH] registry: change registry_init_smbconf() to return WERROR instead of bool Michael (cherry picked from commit 7c343c60574cda091f59861fbcb2893aefb564e9) (cherry picked from commit 6c898b0285a2f822fe401cd0ced1e82873ec7c6d) --- source/lib/smbconf/smbconf_reg.c | 4 ++-- source/registry/reg_init_smbconf.c | 7 ++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/source/lib/smbconf/smbconf_reg.c b/source/lib/smbconf/smbconf_reg.c index 057d74fc36c..dfce7502c58 100644 --- a/source/lib/smbconf/smbconf_reg.c +++ b/source/lib/smbconf/smbconf_reg.c @@ -627,8 +627,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/source/registry/reg_init_smbconf.c b/source/registry/reg_init_smbconf.c index fafaf7952f6..2484200f90a 100644 --- a/source/registry/reg_init_smbconf.c +++ b/source/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")); @@ -108,9 +107,7 @@ bool registry_init_smbconf(const char *keyname) goto done; } - ret = true; - done: regdb_close(); - return ret; + return werr; } -- 2.47.3