]> git.sur5r.net Git - openldap/blobdiff - libraries/libavl/avl.c
Fix up SASL interact error checking
[openldap] / libraries / libavl / avl.c
index adce228dd7a1ec7dc3bd6201c584e3e827a7d632..63a543f8e4fb82f048d2387a887031dfa8119c18 100644 (file)
@@ -1,4 +1,9 @@
 /* avl.c - routines to implement an avl tree */
+/* $OpenLDAP$ */
+/*
+ * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
 /*
  * Copyright (c) 1993 Regents of the University of Michigan.
  * All rights reserved.
@@ -19,7 +24,7 @@ static char avl_version[] = "AVL library version 1.0\n";
 #endif
 
 #include <stdio.h>
-#include <stdlib.h>
+#include <ac/stdlib.h>
 
 #define AVL_INTERNAL
 #include "avl.h"
@@ -27,7 +32,7 @@ static char avl_version[] = "AVL library version 1.0\n";
 #define ROTATERIGHT(x) { \
        Avlnode *tmp;\
        if ( *(x) == NULL || (*(x))->avl_left == NULL ) {\
-               (void) fputs("RR error\n", stderr); exit(1); \
+               (void) fputs("RR error\n", stderr); exit( EXIT_FAILURE ); \
        }\
        tmp = (*(x))->avl_left;\
        (*(x))->avl_left = tmp->avl_right;\
@@ -37,7 +42,7 @@ static char avl_version[] = "AVL library version 1.0\n";
 #define ROTATELEFT(x)  { \
        Avlnode *tmp;\
        if ( *(x) == NULL || (*(x))->avl_right == NULL ) {\
-               (void) fputs("RL error\n", stderr); exit(1); \
+               (void) fputs("RL error\n", stderr); exit( EXIT_FAILURE ); \
        }\
        tmp = (*(x))->avl_right;\
        (*(x))->avl_right = tmp->avl_left;\
@@ -622,7 +627,7 @@ avl_free( Avlnode *root, AVL_FREE dfree )
  */
 
 void*
-avl_find( Avlnode *root, void* data, AVL_CMP fcmp )
+avl_find( Avlnode *root, const void* data, AVL_CMP fcmp )
 {
        int     cmp;
 
@@ -644,7 +649,7 @@ avl_find( Avlnode *root, void* data, AVL_CMP fcmp )
  */
 
 void*
-avl_find_lin( Avlnode *root, void* data, AVL_CMP fcmp )
+avl_find_lin( Avlnode *root, const void* data, AVL_CMP fcmp )
 {
        void*   res;