mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-03-13 14:27:59 +08:00
Make ebuf/ecur char* instead of unsigned char* (which they are never used as)
This commit is contained in:
parent
d6cc947561
commit
0d06b7334e
@ -36,8 +36,8 @@
|
||||
#include "slap.h"
|
||||
#include "ldif.h"
|
||||
|
||||
static unsigned char *ebuf; /* buf returned by entry2str */
|
||||
static unsigned char *ecur; /* pointer to end of currently used ebuf */
|
||||
static char *ebuf; /* buf returned by entry2str */
|
||||
static char *ecur; /* pointer to end of currently used ebuf */
|
||||
static int emaxsize;/* max size of ebuf */
|
||||
|
||||
/*
|
||||
@ -346,7 +346,7 @@ fail:
|
||||
while ( ecur + (n) > ebuf + emaxsize ) { \
|
||||
ptrdiff_t offset; \
|
||||
offset = (int) (ecur - ebuf); \
|
||||
ebuf = (unsigned char *) ch_realloc( (char *) ebuf, \
|
||||
ebuf = ch_realloc( ebuf, \
|
||||
emaxsize + GRABSIZE ); \
|
||||
emaxsize += GRABSIZE; \
|
||||
ecur = ebuf + offset; \
|
||||
@ -378,7 +378,7 @@ entry2str(
|
||||
/* put "dn: <dn>" */
|
||||
tmplen = e->e_name.bv_len;
|
||||
MAKE_SPACE( LDIF_SIZE_NEEDED( 2, tmplen ));
|
||||
ldif_sput( (char **) &ecur, LDIF_PUT_VALUE, "dn", e->e_dn, tmplen );
|
||||
ldif_sput( &ecur, LDIF_PUT_VALUE, "dn", e->e_dn, tmplen );
|
||||
}
|
||||
|
||||
/* put the attributes */
|
||||
@ -388,7 +388,7 @@ entry2str(
|
||||
bv = &a->a_vals[i];
|
||||
tmplen = a->a_desc->ad_cname.bv_len;
|
||||
MAKE_SPACE( LDIF_SIZE_NEEDED( tmplen, bv->bv_len ));
|
||||
ldif_sput( (char **) &ecur, LDIF_PUT_VALUE,
|
||||
ldif_sput( &ecur, LDIF_PUT_VALUE,
|
||||
a->a_desc->ad_cname.bv_val,
|
||||
bv->bv_val, bv->bv_len );
|
||||
}
|
||||
@ -397,7 +397,7 @@ entry2str(
|
||||
*ecur = '\0';
|
||||
*len = ecur - ebuf;
|
||||
|
||||
return( (char *) ebuf );
|
||||
return( ebuf );
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user