registry: change init_registry() to return WERROR instead of bool.
authorMichael Adam <obnox@samba.org>
Sun, 13 Apr 2008 13:31:02 +0000 (15:31 +0200)
committerMichael Adam <obnox@samba.org>
Sun, 13 Apr 2008 13:33:48 +0000 (15:33 +0200)
Michael
(This used to be commit 0b196095dbbc29c796cb0742fe6e57a421e9596b)

source3/registry/reg_init_full.c
source3/smbd/server.c

index ae12e307666de1467c17c0ff97bb25c8b6ae2426..7b9583dde29bfe2db410b6b5687984924a50fff5 100644 (file)
@@ -62,11 +62,10 @@ REGISTRY_HOOK reg_hooks[] = {
  with all available backens.
  ***********************************************************************/
 
-bool init_registry( void )
+WERROR init_registry(void)
 {
        int i;
        WERROR werr;
-       bool ret = false;
 
        werr = registry_init_common();
        if (!W_ERROR_IS_OK(werr)) {
@@ -99,10 +98,8 @@ bool init_registry( void )
        eventlog_init_keys();
        perfcount_init_keys();
 
-       ret = true;
-
 fail:
        /* close and let each smbd open up as necessary */
        regdb_close();
-       return ret;
+       return werr;
 }
index bc0d4b70a3d0d60339b170eb4aea4928dfad7740..9754fab534a8d33910cf4f9918ead684f58fbb0d 100644 (file)
@@ -1323,7 +1323,7 @@ extern void build_options(bool screen);
 
        namecache_enable();
 
-       if (!init_registry())
+       if (!W_ERROR_IS_OK(init_registry()))
                exit(1);
 
 #if 0