Minor adjustments to the LBER_VFREE() & LDAP_VFREE macros.

This commit is contained in:
Kurt Zeilenga 1999-06-01 19:25:17 +00:00
parent 8e60c8e287
commit e44971436c
3 changed files with 10 additions and 8 deletions

View File

@ -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 */

View File

@ -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
/*

View File

@ -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;