summaryrefslogtreecommitdiff
path: root/source3/lib/adt_tree.c
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-04-13 14:41:44 +0200
committerMichael Adam <obnox@samba.org>2008-04-13 15:33:47 +0200
commit01f4bd4f4d05e195911f4787f209b2ab6e2d8ab4 (patch)
tree4c8ac760604b66e21c49520b387b1cce56bfeee2 /source3/lib/adt_tree.c
parent84c5da2ff490c68fcdd66c2ca909c54faed23e8c (diff)
downloadsamba-01f4bd4f4d05e195911f4787f209b2ab6e2d8ab4.tar.gz
samba-01f4bd4f4d05e195911f4787f209b2ab6e2d8ab4.tar.bz2
samba-01f4bd4f4d05e195911f4787f209b2ab6e2d8ab4.zip
adt_tree: change pathtree_add to return WERR instead of bool.
Michael (This used to be commit da45fb92f69221758f36db4cbb7d871e3ce60718)
Diffstat (limited to 'source3/lib/adt_tree.c')
-rw-r--r--source3/lib/adt_tree.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source3/lib/adt_tree.c b/source3/lib/adt_tree.c
index ef72ba3e70..6ac498d9e6 100644
--- a/source3/lib/adt_tree.c
+++ b/source3/lib/adt_tree.c
@@ -191,23 +191,23 @@ static TREE_NODE* pathtree_find_child( TREE_NODE *node, char* key )
Add a new node into the tree given a key path and a blob of data
*************************************************************************/
- bool pathtree_add( SORTED_TREE *tree, const char *path, void *data_p )
+ WERROR pathtree_add( SORTED_TREE *tree, const char *path, void *data_p )
{
char *str, *base, *path2;
TREE_NODE *current, *next;
- bool ret = True;
+ WERROR ret = WERR_OK;
DEBUG(8,("pathtree_add: Enter\n"));
if ( !path || *path != '/' ) {
DEBUG(0,("pathtree_add: Attempt to add a node with a bad path [%s]\n",
path ? path : "NULL" ));
- return False;
+ return WERR_INVALID_PARAM;
}
if ( !tree ) {
DEBUG(0,("pathtree_add: Attempt to add a node to an uninitialized tree!\n"));
- return False;
+ return WERR_INVALID_PARAM;
}
/* move past the first '/' */
@@ -216,7 +216,7 @@ static TREE_NODE* pathtree_find_child( TREE_NODE *node, char* key )
path2 = SMB_STRDUP( path );
if ( !path2 ) {
DEBUG(0,("pathtree_add: strdup() failed on string [%s]!?!?!\n", path));
- return False;
+ return WERR_NOMEM;
}
@@ -244,7 +244,7 @@ static TREE_NODE* pathtree_find_child( TREE_NODE *node, char* key )
next = pathtree_birth_child( current, base );
if ( !next ) {
DEBUG(0,("pathtree_add: Failed to create new child!\n"));
- ret = False;
+ ret = WERR_NOMEM;
goto done;
}
}