diff options
author | Michael Adam <obnox@samba.org> | 2008-04-13 14:18:06 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2008-04-13 15:33:47 +0200 |
commit | 4b4306eb4a55ae1c705464e3220d963651ce9b91 (patch) | |
tree | cc6a0e809094ef03511f68551816bce6ea0d0d27 /source3/registry/reg_cachehook.c | |
parent | 2ffe46e24d369fabf2d1fe44dd91025466fcc502 (diff) | |
download | samba-4b4306eb4a55ae1c705464e3220d963651ce9b91.tar.gz samba-4b4306eb4a55ae1c705464e3220d963651ce9b91.tar.bz2 samba-4b4306eb4a55ae1c705464e3220d963651ce9b91.zip |
registry: change reghook_cache_init() to return WERROR and use it in the callers.
Michael
(This used to be commit 2f4ca62dce50225d67ba8643afba4199e1845c5f)
Diffstat (limited to 'source3/registry/reg_cachehook.c')
-rw-r--r-- | source3/registry/reg_cachehook.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/source3/registry/reg_cachehook.c b/source3/registry/reg_cachehook.c index bfdc0de5f5..c7f099e134 100644 --- a/source3/registry/reg_cachehook.c +++ b/source3/registry/reg_cachehook.c @@ -54,18 +54,19 @@ static char *keyname_to_path(TALLOC_CTX *mem_ctx, const char *keyname) Initialize the cache tree if it has not been initialized yet. *********************************************************************/ -bool reghook_cache_init( void ) +WERROR reghook_cache_init(void) { if (cache_tree == NULL) { cache_tree = pathtree_init(®db_ops, NULL); - if (cache_tree != NULL) { - DEBUG(10, ("reghook_cache_init: new tree with default " - "ops %p for key [%s]\n", (void *)®db_ops, - KEY_TREE_ROOT)); + if (cache_tree == NULL) { + return WERR_NOMEM; } + DEBUG(10, ("reghook_cache_init: new tree with default " + "ops %p for key [%s]\n", (void *)®db_ops, + KEY_TREE_ROOT)); } - return (cache_tree != NULL); + return WERR_OK; } /********************************************************************** |