registry: change registry_init_smbconf() to return WERROR instead of bool
authorMichael Adam <obnox@samba.org>
Sun, 13 Apr 2008 13:25:47 +0000 (15:25 +0200)
committerMichael Adam <obnox@samba.org>
Sun, 13 Apr 2008 13:33:48 +0000 (15:33 +0200)
Michael
(This used to be commit 7c343c60574cda091f59861fbcb2893aefb564e9)

source3/lib/smbconf/smbconf_reg.c
source3/registry/reg_init_smbconf.c

index c53d275938aa6a99c07dd113e5d285c2001314d2..ce38a20f3fc0ba1b3fab6394e421909be920f864 100644 (file)
@@ -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;
        }
 
index a05da854cfb84c80807514a1e9aa7341829ef862..43a5be025d04fc45937a5666f000fc5c09bc2170 100644 (file)
@@ -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;
 }