summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2010-02-07 15:49:13 +0100
committerVolker Lendecke <vl@samba.org>2010-02-13 13:26:11 +0100
commit613777e6dce53fc3c8794ef6cf5d00688ee442e5 (patch)
tree9643a98c78d080f644e9fa8b29d7dc0361e8d30c /source3
parent3ab78e31f095639a77ea3c086e765d91424fa6fa (diff)
downloadsamba-613777e6dce53fc3c8794ef6cf5d00688ee442e5.tar.gz
samba-613777e6dce53fc3c8794ef6cf5d00688ee442e5.tar.bz2
samba-613777e6dce53fc3c8794ef6cf5d00688ee442e5.zip
s3: Remove unused comparison fn from "struct sorted_tree"
Diffstat (limited to 'source3')
-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 b910b7cbbc..c2a869b0f2 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 343173b4f4..7f4a39de6e 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 57097c1ddd..43eae7d61c 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;
}