1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-31 22:02:58 +03:00

registry cachehook: revert logic to make fast path more obvious and reduce indent.

Michael
(This used to be commit e97d558c56)
This commit is contained in:
Michael Adam
2008-04-13 14:40:51 +02:00
parent 4b4306eb4a
commit 84c5da2ff4

View File

@ -56,16 +56,17 @@ static char *keyname_to_path(TALLOC_CTX *mem_ctx, const char *keyname)
WERROR reghook_cache_init(void) WERROR reghook_cache_init(void)
{ {
if (cache_tree == NULL) { if (cache_tree != NULL) {
cache_tree = pathtree_init(&regdb_ops, NULL); return WERR_OK;
if (cache_tree == NULL) {
return WERR_NOMEM;
}
DEBUG(10, ("reghook_cache_init: new tree with default "
"ops %p for key [%s]\n", (void *)&regdb_ops,
KEY_TREE_ROOT));
} }
cache_tree = pathtree_init(&regdb_ops, NULL);
if (cache_tree == NULL) {
return WERR_NOMEM;
}
DEBUG(10, ("reghook_cache_init: new tree with default "
"ops %p for key [%s]\n", (void *)&regdb_ops,
KEY_TREE_ROOT));
return WERR_OK; return WERR_OK;
} }