mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-12-04 14:46:30 -05:00
Remove explicit exit() calls...this was possibly causing some cases of immediate UI termination without any messages...
svn path=/trunk/avl/; revision=5683
This commit is contained in:
parent
c20bc3c346
commit
5e075b9202
@ -22,7 +22,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: avl.c,v 1.9 2003/10/31 19:18:42 oddsock Exp $ */
|
/* $Id: avl.c,v 1.10 2003/12/04 16:27:30 oddsock Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This is a fairly straightfoward translation of a prototype
|
* This is a fairly straightfoward translation of a prototype
|
||||||
@ -989,12 +989,10 @@ avl_verify_balance (avl_node * node)
|
|||||||
long lh = avl_verify_balance (node->left);
|
long lh = avl_verify_balance (node->left);
|
||||||
long rh = avl_verify_balance (node->right);
|
long rh = avl_verify_balance (node->right);
|
||||||
if ((rh - lh) != AVL_GET_BALANCE(node)) {
|
if ((rh - lh) != AVL_GET_BALANCE(node)) {
|
||||||
fprintf (stderr, "invalid balance at node %ld\n", (long) node->key);
|
return 0;
|
||||||
exit(1);
|
|
||||||
}
|
}
|
||||||
if (((lh - rh) > 1) || ((lh - rh) < -1)) {
|
if (((lh - rh) > 1) || ((lh - rh) < -1)) {
|
||||||
fprintf (stderr, "unbalanced at node %ld\n", (long) node->key);
|
return 0;
|
||||||
exit(1);
|
|
||||||
}
|
}
|
||||||
return (1 + AVL_MAX (lh, rh));
|
return (1 + AVL_MAX (lh, rh));
|
||||||
}
|
}
|
||||||
@ -1004,8 +1002,7 @@ static void
|
|||||||
avl_verify_parent (avl_node * node, avl_node * parent)
|
avl_verify_parent (avl_node * node, avl_node * parent)
|
||||||
{
|
{
|
||||||
if (node->parent != parent) {
|
if (node->parent != parent) {
|
||||||
fprintf (stderr, "invalid parent at node %ld\n", (long) node->key);
|
return;
|
||||||
exit(1);
|
|
||||||
}
|
}
|
||||||
if (node->left) {
|
if (node->left) {
|
||||||
avl_verify_parent (node->left, node);
|
avl_verify_parent (node->left, node);
|
||||||
|
Loading…
Reference in New Issue
Block a user