summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/adt_tree.c6
-rw-r--r--source3/lib/charcnv.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/source3/lib/adt_tree.c b/source3/lib/adt_tree.c
index 0bc224ec23..bd857e205a 100644
--- a/source3/lib/adt_tree.c
+++ b/source3/lib/adt_tree.c
@@ -65,7 +65,7 @@ SORTED_TREE* sorted_tree_init( void *data_p,
ZERO_STRUCTP( tree );
tree->compare = cmp_fn;
- tree->free = free_fn;
+ tree->free_func = free_fn;
if ( !(tree->root = (TREE_NODE*)malloc( sizeof(TREE_NODE) )) ) {
SAFE_FREE( tree );
@@ -110,8 +110,8 @@ void sorted_tree_destroy( SORTED_TREE *tree )
if ( tree->root )
sorted_tree_destroy_children( tree->root );
- if ( tree->free )
- tree->free( tree->root );
+ if ( tree->free_func )
+ tree->free_func( tree->root );
SAFE_FREE( tree );
}
diff --git a/source3/lib/charcnv.c b/source3/lib/charcnv.c
index c2213c966d..20af806d90 100644
--- a/source3/lib/charcnv.c
+++ b/source3/lib/charcnv.c
@@ -1110,7 +1110,7 @@ size_t pull_ucs2(const void *base_ptr, char *dest, const void *src, size_t dest_
if (ucs2_align(base_ptr, src, flags)) {
src = (const void *)((const char *)src + 1);
- if (src_len > 0)
+ if (src_len != (size_t)-1)
src_len--;
}