#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 */
/*
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; \
/* 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 */
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 );
}
*ecur = '\0';
*len = ecur - ebuf;
- return( (char *) ebuf );
+ return( ebuf );
}
void