[xiph-cvs] cvs commit: avl avl.c

Ed oddsock at xiph.org
Thu Dec 4 08:27:30 PST 2003



oddsock     03/12/04 11:27:30

  Modified:    .        avl.c
  Log:
  Remove explicit exit() calls...this was possibly causing some cases of immediate UI termination without any messages...

Revision  Changes    Path
1.10      +4 -7      avl/avl.c

Index: avl.c
===================================================================
RCS file: /usr/local/cvsroot/avl/avl.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- avl.c	31 Oct 2003 19:18:42 -0000	1.9
+++ avl.c	4 Dec 2003 16:27:30 -0000	1.10
@@ -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
@@ -989,12 +989,10 @@
     long lh = avl_verify_balance (node->left);
     long rh = avl_verify_balance (node->right);
     if ((rh - lh) != AVL_GET_BALANCE(node)) {
-      fprintf (stderr, "invalid balance at node %ld\n", (long) node->key);
-      exit(1);
+      return 0;
     }
     if (((lh - rh) > 1) || ((lh - rh) < -1)) {
-      fprintf (stderr, "unbalanced at node %ld\n", (long) node->key);
-      exit(1);
+      return 0;
     }
     return (1 + AVL_MAX (lh, rh));
   }
@@ -1004,8 +1002,7 @@
 avl_verify_parent (avl_node * node, avl_node * parent)
 {
   if (node->parent != parent) {
-    fprintf (stderr, "invalid parent at node %ld\n", (long) node->key);
-    exit(1);
+    return;
   }
   if (node->left) {
     avl_verify_parent (node->left, node);

<p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list