Make ebuf/ecur char* instead of unsigned char* (which they are never used as)

This commit is contained in:
Hallvard Furuseth 2005-07-14 21:02:59 +00:00
parent d6cc947561
commit 0d06b7334e

View File

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