mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-24 13:24:56 +08:00
Cleanup previous
This commit is contained in:
parent
c607ed0a6f
commit
c4ab31ddc9
@ -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;
|
||||
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;
|
||||
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user