Increased the maximum depth of AVL trees
This commit is contained in:
@ -1447,7 +1447,7 @@ index_t obi_avl_add(OBIDMS_avl_p avl, byte_t* value)
|
||||
byte_t* to_compare;
|
||||
int comp;
|
||||
uint8_t n = 0;
|
||||
uint8_t depth = 0;
|
||||
int depth = 0;
|
||||
|
||||
// Check if first node
|
||||
if (!((avl->header)->nb_items))
|
||||
@ -1508,7 +1508,7 @@ index_t obi_avl_add(OBIDMS_avl_p avl, byte_t* value)
|
||||
if (depth == AVL_MAX_DEPTH)
|
||||
{
|
||||
obi_set_errno(OBI_AVL_ERROR);
|
||||
obidebug(1, "\nThis AVL tree has reached the maximum height (50).");
|
||||
obidebug(1, "\nThis AVL tree has reached the maximum height (%d).", AVL_MAX_DEPTH);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user