From e44971436c3ead281b5ef214f4cbba942888a710 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 1 Jun 1999 19:25:17 +0000 Subject: [PATCH] Minor adjustments to the LBER_VFREE() & LDAP_VFREE macros. --- libraries/liblber/lber-int.h | 4 ++-- libraries/libldap/ldap-int.h | 4 ++-- libraries/libldap/tmplout.c | 10 ++++++---- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/libraries/liblber/lber-int.h b/libraries/liblber/lber-int.h index 5ab2dc21a9..2a8349aff6 100644 --- a/libraries/liblber/lber-int.h +++ b/libraries/liblber/lber-int.h @@ -199,13 +199,13 @@ extern BerMemoryFunctions* ber_int_memory_fns; #define LBER_INT_CALLOC(n,s) ber_memcalloc((n),(s)) #define LBER_INT_REALLOC(p,s) ber_memrealloc((p),(s)) #define LBER_INT_FREE(p) ber_memfree((p)) -#define LBER_INT_VFREE(v) ber_memvfree((v)) +#define LBER_INT_VFREE(v) ber_memvfree((void**)(v)) #define LBER_MALLOC(s) ber_memalloc((s)) #define LBER_CALLOC(n,s) ber_memcalloc((n),(s)) #define LBER_REALLOC(p,s) ber_memrealloc((p),(s)) #define LBER_FREE(p) ber_memfree((p)) -#define LBER_VFREE(v) ber_memvfree((v)) +#define LBER_VFREE(v) ber_memvfree((void**)(v)) /* sockbuf.c */ diff --git a/libraries/libldap/ldap-int.h b/libraries/libldap/ldap-int.h index ff2f2da311..6a7953ec6f 100644 --- a/libraries/libldap/ldap-int.h +++ b/libraries/libldap/ldap-int.h @@ -271,14 +271,14 @@ void ldap_int_initialize LDAP_P((void)); #define LDAP_INT_CALLOC(n,s) (LBER_CALLOC((n),(s))) #define LDAP_INT_REALLOC(p,s) (LBER_REALLOC((p),(s))) #define LDAP_INT_FREE(p) (LBER_FREE((p))) -#define LDAP_INT_VFREE(v) (LBER_VFREE((v))) +#define LDAP_INT_VFREE(v) (LBER_VFREE((void **)(v))) #ifndef LDAP_MALLOC #define LDAP_MALLOC(s) (LBER_MALLOC((s))) #define LDAP_CALLOC(n,s) (LBER_CALLOC((n),(s))) #define LDAP_REALLOC(p,s) (LBER_REALLOC((p),(s))) #define LDAP_FREE(p) (LBER_FREE((p))) -#define LDAP_VFREE(v) (LBER_VFREE((v))) +#define LDAP_VFREE(v) (LBER_VFREE((void **)(v))) #endif /* diff --git a/libraries/libldap/tmplout.c b/libraries/libldap/tmplout.c index 7a19d55f02..ec82cfcba9 100644 --- a/libraries/libldap/tmplout.c +++ b/libraries/libldap/tmplout.c @@ -29,6 +29,8 @@ #include "ldap-int.h" #include "ldapconfig.h" +#define writeptype ldap_writeptype + /* local functions */ static int do_entry2text LDAP_P(( LDAP *ld, char *buf, char *base, LDAPMessage *entry, @@ -271,9 +273,9 @@ do_entry2text( } } else { for ( rowp = ldap_first_tmplrow( tmpl ); - NONFATAL_LDAP_ERR( err ) && rowp != NULLTMPLITEM; + NONFATAL_LDAP_ERR( err ) && rowp != NULL; rowp = ldap_next_tmplrow( tmpl, rowp )) { - for ( colp = ldap_first_tmplcol( tmpl, rowp ); colp != NULLTMPLITEM; + for ( colp = ldap_first_tmplcol( tmpl, rowp ); colp != NULL; colp = ldap_next_tmplcol( tmpl, rowp, colp )) { vals = NULL; if ( colp->ti_attrname == NULL || ( vals = ldap_get_values( ld, @@ -768,9 +770,9 @@ max_label_len( struct ldap_disptmpl *tmpl ) maxlen = 0; - for ( rowp = ldap_first_tmplrow( tmpl ); rowp != NULLTMPLITEM; + for ( rowp = ldap_first_tmplrow( tmpl ); rowp != NULL; rowp = ldap_next_tmplrow( tmpl, rowp )) { - for ( colp = ldap_first_tmplcol( tmpl, rowp ); colp != NULLTMPLITEM; + for ( colp = ldap_first_tmplcol( tmpl, rowp ); colp != NULL; colp = ldap_next_tmplcol( tmpl, rowp, colp )) { if (( len = strlen( colp->ti_label )) > maxlen ) { maxlen = len; -- 2.39.5