char *type;
char *value;
char *next;
- int vlen, nvals, maxvals;
+ ber_len_t vlen;
+ int nvals, maxvals;
struct berval bval;
struct berval *vals[2];
char ptype[64];
/* check to see if there's an id included */
next = s;
- if ( isdigit( *s ) ) {
+ if ( isdigit( (unsigned char) *s ) ) {
id = atoi( s );
if ( (s = ldif_getline( &next )) == NULL ) {
Debug( LDAP_DEBUG_TRACE,
e->e_id, e->e_ndn, value );
free( e->e_ndn );
}
- e->e_ndn = dn_normalize_case( ch_strdup( value ) );
+ e->e_ndn = ch_strdup( value );
+ (void) dn_normalize_case( e->e_ndn );
continue;
}
/* put "dn: <dn>" */
tmplen = strlen( e->e_dn );
MAKE_SPACE( LDIF_SIZE_NEEDED( 2, tmplen ));
- ldif_put_type_and_value( (char **) &ecur, "dn", e->e_dn, tmplen );
+ ldif_sput( (char **) &ecur, LDIF_PUT_VALUE, "dn", e->e_dn, tmplen );
}
/* put the attributes */
bv = a->a_vals[i];
tmplen = strlen( a->a_type );
MAKE_SPACE( LDIF_SIZE_NEEDED( tmplen, bv->bv_len ));
- ldif_put_type_and_value( (char **) &ecur, a->a_type,
+ ldif_sput( (char **) &ecur, LDIF_PUT_VALUE, a->a_type,
bv->bv_val, bv->bv_len );
}
}
void
entry_free( Entry *e )
{
- int i;
Attribute *a, *next;
if ( e->e_dn != NULL ) {