From: Hallvard Furuseth Date: Thu, 14 Jul 2005 21:02:59 +0000 (+0000) Subject: Make ebuf/ecur char* instead of unsigned char* (which they are never used as) X-Git-Tag: OPENLDAP_AC_BP~401 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0d06b7334e85428c59595d68b9c7b0423a4def56;p=openldap Make ebuf/ecur char* instead of unsigned char* (which they are never used as) --- diff --git a/servers/slapd/entry.c b/servers/slapd/entry.c index 4f4634caf4..a5b34ea99a 100644 --- a/servers/slapd/entry.c +++ b/servers/slapd/entry.c @@ -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: " */ 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