Commit c4ab31dd authored by Howard Chu's avatar Howard Chu
Browse files

Cleanup previous

parent c607ed0a
......@@ -533,24 +533,20 @@ ldap_build_entry(
next_attr:;
if ( normalize ) {
if ( last && attr->a_desc->ad_type->sat_equality &&
attr->a_desc->ad_type->sat_equality->smr_normalize ) {
int i;
attr->a_nvals = ch_malloc((last+1)*sizeof(struct berval));
for (i=0; i<last; i++) {
attr->a_desc->ad_type->sat_equality->smr_normalize(
SLAP_MR_VALUE_OF_ATTRIBUTE_SYNTAX,
attr->a_desc->ad_type->sat_syntax,
attr->a_desc->ad_type->sat_equality,
&attr->a_vals[i], &attr->a_nvals[i] );
}
attr->a_nvals[i].bv_val = NULL;
attr->a_nvals[i].bv_len = 0;
} else {
attr->a_nvals = attr->a_vals;
if ( normalize && last && attr->a_desc->ad_type->sat_equality &&
attr->a_desc->ad_type->sat_equality->smr_normalize ) {
int i;
attr->a_nvals = ch_malloc((last+1)*sizeof(struct berval));
for (i=0; i<last; i++) {
attr->a_desc->ad_type->sat_equality->smr_normalize(
SLAP_MR_VALUE_OF_ATTRIBUTE_SYNTAX,
attr->a_desc->ad_type->sat_syntax,
attr->a_desc->ad_type->sat_equality,
&attr->a_vals[i], &attr->a_nvals[i] );
}
attr->a_nvals[i].bv_val = NULL;
attr->a_nvals[i].bv_len = 0;
} else {
attr->a_nvals = attr->a_vals;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment