summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/include/adt_tree.h2
-rw-r--r--source3/lib/adt_tree.c10
-rw-r--r--source3/registry/reg_cachehook.c2
3 files changed, 4 insertions, 10 deletions
diff --git a/source3/include/adt_tree.h b/source3/include/adt_tree.h
index b910b7cbbc0..c2a869b0f27 100644
--- a/source3/include/adt_tree.h
+++ b/source3/include/adt_tree.h
@@ -28,7 +28,7 @@ struct sorted_tree;
/* create a new tree, talloc_free() to throw it away */
-struct sorted_tree *pathtree_init( void *data_p, int (cmp_fn)(void*, void*) );
+struct sorted_tree *pathtree_init(void *data_p);
/* add a new path component */
diff --git a/source3/lib/adt_tree.c b/source3/lib/adt_tree.c
index 343173b4f42..7f4a39de6e5 100644
--- a/source3/lib/adt_tree.c
+++ b/source3/lib/adt_tree.c
@@ -30,9 +30,6 @@ struct tree_node {
struct sorted_tree {
struct tree_node *root;
-
- /* not used currently (is it needed?) */
- int (*compare)(void* x, void *y);
};
/**************************************************************************
@@ -60,11 +57,10 @@ static bool trim_tree_keypath( char *path, char **base, char **new_path )
}
/**************************************************************************
- Initialize the tree's root. The cmp_fn is a callback function used
- for comparision of two children
+ Initialize the tree's root.
*************************************************************************/
-struct sorted_tree *pathtree_init( void *data_p, int (cmp_fn)(void*, void*) )
+struct sorted_tree *pathtree_init(void *data_p)
{
struct sorted_tree *tree = NULL;
@@ -73,8 +69,6 @@ struct sorted_tree *pathtree_init( void *data_p, int (cmp_fn)(void*, void*) )
return NULL;
}
- tree->compare = cmp_fn;
-
tree->root = talloc_zero(tree, struct tree_node);
if (tree->root == NULL) {
TALLOC_FREE( tree );
diff --git a/source3/registry/reg_cachehook.c b/source3/registry/reg_cachehook.c
index 57097c1ddd2..43eae7d61c7 100644
--- a/source3/registry/reg_cachehook.c
+++ b/source3/registry/reg_cachehook.c
@@ -64,7 +64,7 @@ WERROR reghook_cache_init(void)
return WERR_OK;
}
- cache_tree = pathtree_init(&regdb_ops, NULL);
+ cache_tree = pathtree_init(&regdb_ops);
if (cache_tree == NULL) {
return WERR_NOMEM;
}