]> git.sur5r.net Git - openldap/commitdiff
Make ebuf/ecur char* instead of unsigned char* (which they are never used as)
authorHallvard Furuseth <hallvard@openldap.org>
Thu, 14 Jul 2005 21:02:59 +0000 (21:02 +0000)
committerHallvard Furuseth <hallvard@openldap.org>
Thu, 14 Jul 2005 21:02:59 +0000 (21:02 +0000)
servers/slapd/entry.c

index 4f4634caf4c05e8de9c613b1ceae5a3e664947f8..a5b34ea99ab4d41384c3722c21c6ac68063eeb7e 100644 (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