mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-15 03:01:09 +08:00
Minor adjustments to the LBER_VFREE() & LDAP_VFREE macros.
This commit is contained in:
parent
8e60c8e287
commit
e44971436c
@ -199,13 +199,13 @@ extern BerMemoryFunctions* ber_int_memory_fns;
|
|||||||
#define LBER_INT_CALLOC(n,s) ber_memcalloc((n),(s))
|
#define LBER_INT_CALLOC(n,s) ber_memcalloc((n),(s))
|
||||||
#define LBER_INT_REALLOC(p,s) ber_memrealloc((p),(s))
|
#define LBER_INT_REALLOC(p,s) ber_memrealloc((p),(s))
|
||||||
#define LBER_INT_FREE(p) ber_memfree((p))
|
#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_MALLOC(s) ber_memalloc((s))
|
||||||
#define LBER_CALLOC(n,s) ber_memcalloc((n),(s))
|
#define LBER_CALLOC(n,s) ber_memcalloc((n),(s))
|
||||||
#define LBER_REALLOC(p,s) ber_memrealloc((p),(s))
|
#define LBER_REALLOC(p,s) ber_memrealloc((p),(s))
|
||||||
#define LBER_FREE(p) ber_memfree((p))
|
#define LBER_FREE(p) ber_memfree((p))
|
||||||
#define LBER_VFREE(v) ber_memvfree((v))
|
#define LBER_VFREE(v) ber_memvfree((void**)(v))
|
||||||
|
|
||||||
/* sockbuf.c */
|
/* sockbuf.c */
|
||||||
|
|
||||||
|
@ -271,14 +271,14 @@ void ldap_int_initialize LDAP_P((void));
|
|||||||
#define LDAP_INT_CALLOC(n,s) (LBER_CALLOC((n),(s)))
|
#define LDAP_INT_CALLOC(n,s) (LBER_CALLOC((n),(s)))
|
||||||
#define LDAP_INT_REALLOC(p,s) (LBER_REALLOC((p),(s)))
|
#define LDAP_INT_REALLOC(p,s) (LBER_REALLOC((p),(s)))
|
||||||
#define LDAP_INT_FREE(p) (LBER_FREE((p)))
|
#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
|
#ifndef LDAP_MALLOC
|
||||||
#define LDAP_MALLOC(s) (LBER_MALLOC((s)))
|
#define LDAP_MALLOC(s) (LBER_MALLOC((s)))
|
||||||
#define LDAP_CALLOC(n,s) (LBER_CALLOC((n),(s)))
|
#define LDAP_CALLOC(n,s) (LBER_CALLOC((n),(s)))
|
||||||
#define LDAP_REALLOC(p,s) (LBER_REALLOC((p),(s)))
|
#define LDAP_REALLOC(p,s) (LBER_REALLOC((p),(s)))
|
||||||
#define LDAP_FREE(p) (LBER_FREE((p)))
|
#define LDAP_FREE(p) (LBER_FREE((p)))
|
||||||
#define LDAP_VFREE(v) (LBER_VFREE((v)))
|
#define LDAP_VFREE(v) (LBER_VFREE((void **)(v)))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -29,6 +29,8 @@
|
|||||||
#include "ldap-int.h"
|
#include "ldap-int.h"
|
||||||
#include "ldapconfig.h"
|
#include "ldapconfig.h"
|
||||||
|
|
||||||
|
#define writeptype ldap_writeptype
|
||||||
|
|
||||||
/* local functions */
|
/* local functions */
|
||||||
static int do_entry2text LDAP_P((
|
static int do_entry2text LDAP_P((
|
||||||
LDAP *ld, char *buf, char *base, LDAPMessage *entry,
|
LDAP *ld, char *buf, char *base, LDAPMessage *entry,
|
||||||
@ -271,9 +273,9 @@ do_entry2text(
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for ( rowp = ldap_first_tmplrow( tmpl );
|
for ( rowp = ldap_first_tmplrow( tmpl );
|
||||||
NONFATAL_LDAP_ERR( err ) && rowp != NULLTMPLITEM;
|
NONFATAL_LDAP_ERR( err ) && rowp != NULL;
|
||||||
rowp = ldap_next_tmplrow( tmpl, rowp )) {
|
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 )) {
|
colp = ldap_next_tmplcol( tmpl, rowp, colp )) {
|
||||||
vals = NULL;
|
vals = NULL;
|
||||||
if ( colp->ti_attrname == NULL || ( vals = ldap_get_values( ld,
|
if ( colp->ti_attrname == NULL || ( vals = ldap_get_values( ld,
|
||||||
@ -768,9 +770,9 @@ max_label_len( struct ldap_disptmpl *tmpl )
|
|||||||
|
|
||||||
maxlen = 0;
|
maxlen = 0;
|
||||||
|
|
||||||
for ( rowp = ldap_first_tmplrow( tmpl ); rowp != NULLTMPLITEM;
|
for ( rowp = ldap_first_tmplrow( tmpl ); rowp != NULL;
|
||||||
rowp = ldap_next_tmplrow( tmpl, rowp )) {
|
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 )) {
|
colp = ldap_next_tmplcol( tmpl, rowp, colp )) {
|
||||||
if (( len = strlen( colp->ti_label )) > maxlen ) {
|
if (( len = strlen( colp->ti_label )) > maxlen ) {
|
||||||
maxlen = len;
|
maxlen = len;
|
||||||
|
Loading…
Reference in New Issue
Block a user