summaryrefslogtreecommitdiff
path: root/source3/lib/adt_tree.c
diff options
context:
space:
mode:
authorIvo De Decker <ivo.dedecker@ugent.be>2013-05-10 13:33:02 +0200
committerIvo De Decker <ivo.dedecker@ugent.be>2013-05-10 13:33:02 +0200
commit31202ad025bcdeb2585d18dc3f4641b5cf9c0ec4 (patch)
tree32c20d66684ac97b86e55495146e9a676bfae85a /source3/lib/adt_tree.c
parent2865eba17fddda6c49f1209ca92d539111e7ff93 (diff)
downloadsamba-31202ad025bcdeb2585d18dc3f4641b5cf9c0ec4.tar.gz
Imported Upstream version 4.0.0+dfsg1upstream/4.0.0+dfsg1
Diffstat (limited to 'source3/lib/adt_tree.c')
-rw-r--r--source3/lib/adt_tree.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source3/lib/adt_tree.c b/source3/lib/adt_tree.c
index 6d481613c7..b6b5a98da0 100644
--- a/source3/lib/adt_tree.c
+++ b/source3/lib/adt_tree.c
@@ -134,7 +134,7 @@ static struct tree_node *pathtree_birth_child(struct tree_node *node,
/* the strings should never match assuming that we
have called pathtree_find_child() first */
- if ( StrCaseCmp( infant->key, node->children[i-1]->key ) > 0 ) {
+ if ( strcasecmp_m( infant->key, node->children[i-1]->key ) > 0 ) {
DEBUG(11,("pathtree_birth_child: storing infant in i == [%d]\n",
i));
node->children[i] = infant;
@@ -183,7 +183,7 @@ static struct tree_node *pathtree_find_child(struct tree_node *node,
DEBUG(11,("pathtree_find_child: child key => [%s]\n",
node->children[i]->key));
- result = StrCaseCmp( node->children[i]->key, key );
+ result = strcasecmp_m( node->children[i]->key, key );
if ( result == 0 )
next = node->children[i];
@@ -206,23 +206,23 @@ 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"));
if ( !path || *path != '\\' ) {
DEBUG(0,("pathtree_add: Attempt to add a node with a bad path [%s]\n",
path ? path : "NULL" ));
- return WERR_INVALID_PARAM;
+ return false;
}
if ( !tree ) {
DEBUG(0,("pathtree_add: Attempt to add a node to an uninitialized tree!\n"));
- return WERR_INVALID_PARAM;
+ return false;
}
/* move past the first '\\' */
@@ -231,7 +231,7 @@ WERROR pathtree_add(struct sorted_tree *tree, const char *path, void *data_p)
path2 = SMB_STRDUP( path );
if ( !path2 ) {
DEBUG(0,("pathtree_add: strdup() failed on string [%s]!?!?!\n", path));
- return WERR_NOMEM;
+ return false;
}
@@ -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;
}
}