mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
adt_tree: Avoid WERROR.
This commit is contained in:
parent
71d41a015a
commit
6f1b735cc2
@ -32,7 +32,7 @@ struct sorted_tree *pathtree_init(void *data_p);
|
||||
|
||||
/* add a new path component */
|
||||
|
||||
WERROR pathtree_add(struct sorted_tree *tree, const char *path, void *data_p );
|
||||
bool pathtree_add(struct sorted_tree *tree, const char *path, void *data_p );
|
||||
|
||||
/* search path */
|
||||
|
||||
|
@ -206,11 +206,11 @@ static struct tree_node *pathtree_find_child(struct tree_node *node,
|
||||
Add a new node into the tree given a key path and a blob of data
|
||||
*************************************************************************/
|
||||
|
||||
WERROR pathtree_add(struct sorted_tree *tree, const char *path, void *data_p)
|
||||
bool pathtree_add(struct sorted_tree *tree, const char *path, void *data_p)
|
||||
{
|
||||
char *str, *base, *path2;
|
||||
struct tree_node *current, *next;
|
||||
WERROR ret = WERR_OK;
|
||||
bool ret = true;
|
||||
|
||||
DEBUG(8,("pathtree_add: Enter\n"));
|
||||
|
||||
@ -259,7 +259,7 @@ WERROR pathtree_add(struct sorted_tree *tree, const char *path, void *data_p)
|
||||
next = pathtree_birth_child( current, base );
|
||||
if ( !next ) {
|
||||
DEBUG(0,("pathtree_add: Failed to create new child!\n"));
|
||||
ret = WERR_NOMEM;
|
||||
ret = false;
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
@ -93,7 +93,10 @@ WERROR reghook_cache_add(const char *keyname, struct registry_ops *ops)
|
||||
DEBUG(10, ("reghook_cache_add: Adding ops %p for key [%s]\n",
|
||||
(void *)ops, key));
|
||||
|
||||
werr = pathtree_add(cache_tree, key, ops);
|
||||
if (!pathtree_add(cache_tree, key, ops))
|
||||
werr = WERR_NOMEM;
|
||||
else
|
||||
werr = WERR_OK;
|
||||
|
||||
done:
|
||||
TALLOC_FREE(key);
|
||||
|
Loading…
Reference in New Issue
Block a user