s3: Remove unused comparison fn from "struct sorted_tree"
authorVolker Lendecke <vl@samba.org>
Sun, 7 Feb 2010 14:49:13 +0000 (15:49 +0100)
committerVolker Lendecke <vl@samba.org>
Sat, 13 Feb 2010 12:26:11 +0000 (13:26 +0100)
source3/include/adt_tree.h
source3/lib/adt_tree.c
source3/registry/reg_cachehook.c

index b910b7cbbc0df8f66f5cea136bd6a58b9c428d08..c2a869b0f2704fab90920e23ad13fb6e4095d2ca 100644 (file)
@@ -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 */
 
index 343173b4f42b365b8f69a92681bb2b3f268940a2..7f4a39de6e510c811276d2450ff716a9b112ae64 100644 (file)
@@ -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 );
index 57097c1ddd2b1c336b365630a1f64647b0fb9545..43eae7d61c7a37514338f7a4408300d6301bd1a2 100644 (file)
@@ -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;
        }