]> git.sur5r.net Git - openldap/commitdiff
Version.c deprecated in favor of mkversion.
authorKurt Zeilenga <kurt@openldap.org>
Thu, 20 May 1999 19:38:03 +0000 (19:38 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Thu, 20 May 1999 19:38:03 +0000 (19:38 +0000)
Minor cleanup to lber files.

libraries/libavl/Version.c [deleted file]
libraries/liblber/Version.c [deleted file]
libraries/liblber/decode.c
libraries/libldap/Version.c [deleted file]
libraries/libldap/unbind.c
libraries/libldap_r/Version.c [deleted file]
libraries/libldbm/Version.c [deleted file]
libraries/libldif/Version.c [deleted file]

diff --git a/libraries/libavl/Version.c b/libraries/libavl/Version.c
deleted file mode 100644 (file)
index 182138d..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * Copyright (c) 1995 Regents of the University of Michigan.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that this notice is preserved and that due credit is given
- * to the University of Michigan at Ann Arbor. The name of the University
- * may not be used to endorse or promote products derived from this
- * software without specific prior written permission. This software
- * is provided ``as is'' without express or implied warranty.
- */
-
-static char Version[] = "  libavl.a v%VERSION% (%WHEN%)\n\t%WHOANDWHERE%\n";
diff --git a/libraries/liblber/Version.c b/libraries/liblber/Version.c
deleted file mode 100644 (file)
index 61093cd..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
- * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
- */
-/* Portions
- * Copyright (c) 1991 Regents of the University of Michigan.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that this notice is preserved and that due credit is given
- * to the University of Michigan at Ann Arbor. The name of the University
- * may not be used to endorse or promote products derived from this
- * software without specific prior written permission. This software
- * is provided ``as is'' without express or implied warranty.
- */
-
-static char Version[] = "  liblber.a v%VERSION% (%WHEN%)\n\t%WHOANDWHERE%\n";
index 3fe5030adaaf484bf0fc863129d8c8ff6d77df30..bddb359d083b07d058cdd351295fb8339539967f 100644 (file)
@@ -446,11 +446,9 @@ va_dcl
 
        fmt_reset = fmt;
 
-       if ( ber->ber_debug ) {
-               ber_log_printf( LDAP_DEBUG_TRACE, ber->ber_debug,
-                       "ber_scanf fmt (%s) ber:\n", fmt );
-               ber_log_dump( LDAP_DEBUG_BER, ber->ber_debug, ber, 1 );
-       }
+       ber_log_printf( LDAP_DEBUG_TRACE, ber->ber_debug,
+               "ber_scanf fmt (%s) ber:\n", fmt );
+       ber_log_dump( LDAP_DEBUG_BER, ber->ber_debug, ber, 1 );
 
        for ( rc = 0; *fmt && rc != LBER_DEFAULT; fmt++ ) {
                /* When this is modified, remember to update
@@ -670,7 +668,7 @@ va_dcl
 
                case 'o':       /* octet string in a supplied berval */
                        bval = va_arg( ap, struct berval * );
-                       if ( bval->bv_val ) {
+                       if ( bval->bv_val != NULL ) {
                                free( bval->bv_val );
                                bval->bv_val = NULL;
                        }
diff --git a/libraries/libldap/Version.c b/libraries/libldap/Version.c
deleted file mode 100644 (file)
index 9a043d7..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
- * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
- */
-/* Portions
- * Copyright (c) 1991 Regents of the University of Michigan.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that this notice is preserved and that due credit is given
- * to the University of Michigan at Ann Arbor. The name of the University
- * may not be used to endorse or promote products derived from this
- * software without specific prior written permission. This software
- * is provided ``as is'' without express or implied warranty.
- */
-
-static char Version[] = "  libldap.a v%VERSION% (%WHEN%)\n\t%WHOANDWHERE%\n";
index fb1c2e4d4d4f2d8b3edb289c71c787cffdf9d7f5..c9f14ec34a9c8d5d85711c2f9a0711ebc120b89e 100644 (file)
@@ -84,34 +84,60 @@ ldap_ld_free(
        }
 
 #ifndef LDAP_NOCACHE
-       if ( ld->ld_cache != NULL )
+       if ( ld->ld_cache != NULL ) {
                ldap_destroy_cache( ld );
+               ld->ld_cache = NULL;
+       }
 #endif /* !LDAP_NOCACHE */
-       if ( ld->ld_error != NULL )
+
+       if ( ld->ld_error != NULL ) {
                free( ld->ld_error );
-       if ( ld->ld_matched != NULL )
+               ld->ld_error = NULL;
+       }
+
+       if ( ld->ld_matched != NULL ) {
                free( ld->ld_matched );
-       if ( ld->ld_host != NULL )
+               ld->ld_matched = NULL;
+       }
+
+       if ( ld->ld_host != NULL ) {
                free( ld->ld_host );
-       if ( ld->ld_ufnprefix != NULL )
+               ld->ld_host = NULL;
+       }
+
+       if ( ld->ld_ufnprefix != NULL ) {
                free( ld->ld_ufnprefix );
-       if ( ld->ld_filtd != NULL )
+               ld->ld_ufnprefix = NULL;
+       }
+
+       if ( ld->ld_filtd != NULL ) {
                ldap_getfilter_free( ld->ld_filtd );
-       if ( ld->ld_abandoned != NULL )
+               ld->ld_filtd = NULL;
+       }
+
+       if ( ld->ld_abandoned != NULL ) {
                free( ld->ld_abandoned );
+               ld->ld_abandoned = NULL;
+       }
 
 #ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS
-       if ( ld->ld_selectinfo != NULL )
+       if ( ld->ld_selectinfo != NULL ) {
                ldap_free_select_info( ld->ld_selectinfo );
+               ld->ld_selectinfo = NULL;
+       }
 #else
        ber_clear( &(ld->ld_ber), 1 );
 #endif /* LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS */
 
-       if ( ld->ld_options.ldo_defbase != NULL )
+       if ( ld->ld_options.ldo_defbase != NULL ) {
                free( ld->ld_options.ldo_defbase );
+               ld->ld_options.ldo_defbase = NULL;
+       }
 
-       if ( ld->ld_options.ldo_defhost != NULL )
+       if ( ld->ld_options.ldo_defhost != NULL ) {
                free( ld->ld_options.ldo_defhost );
+               ld->ld_options.ldo_defhost = NULL;
+       }
 
        ber_pvt_sb_destroy( &(ld->ld_sb) );   
    
diff --git a/libraries/libldap_r/Version.c b/libraries/libldap_r/Version.c
deleted file mode 100644 (file)
index a827b33..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-/*
- * Reentrant version of -lldap
- */
-
-static char Version[] = "  libldap_r.a v%VERSION% (%WHEN%)\n\t%WHOANDWHERE%\n";
diff --git a/libraries/libldbm/Version.c b/libraries/libldbm/Version.c
deleted file mode 100644 (file)
index c71ad08..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * Copyright (c) 1995 Regents of the University of Michigan.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that this notice is preserved and that due credit is given
- * to the University of Michigan at Ann Arbor. The name of the University
- * may not be used to endorse or promote products derived from this
- * software without specific prior written permission. This software
- * is provided ``as is'' without express or implied warranty.
- */
-
-static char Version[] = "  libldbm.a v%VERSION% (%WHEN%)\n\t%WHOANDWHERE%\n";
diff --git a/libraries/libldif/Version.c b/libraries/libldif/Version.c
deleted file mode 100644 (file)
index d4d4fbf..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/*
- * Copyright (c) 1996 Regents of the University of Michigan.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that this notice is preserved and that due credit is given
- * to the University of Michigan at Ann Arbor. The name of the University
- * may not be used to endorse or promote products derived from this
- * software without specific prior written permission. This software
- * is provided ``as is'' without express or implied warranty.
- */
-
-static char Version[] = "  libldif.a v%VERSION% (%WHEN%)\n\t%WHOANDWHERE%\n";