mirror of
https://github.com/samba-team/samba.git
synced 2025-03-27 22:50:26 +03:00
s3: Remove unused comparison fn from "struct sorted_tree"
This commit is contained in:
parent
3ab78e31f0
commit
613777e6dc
@ -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 */
|
||||
|
||||
|
@ -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 );
|
||||
|
@ -64,7 +64,7 @@ WERROR reghook_cache_init(void)
|
||||
return WERR_OK;
|
||||
}
|
||||
|
||||
cache_tree = pathtree_init(®db_ops, NULL);
|
||||
cache_tree = pathtree_init(®db_ops);
|
||||
if (cache_tree == NULL) {
|
||||
return WERR_NOMEM;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user