while ( attr->a_numvals > 1 ) {
int i;
int rc = slap_sort_vals( (Modifications *)attr, &text, &i, op->o_tmpmemctx );
- if ( rc != LDAP_TYPE_OR_VALUE_EXISTS ) {
- attr->a_flags |= SLAP_ATTR_SORTED_VALS;
+ if ( rc != LDAP_TYPE_OR_VALUE_EXISTS )
break;
- }
/* Strip duplicate values */
if ( attr->a_nvals != attr->a_vals )
}
BER_BVZERO(&attr->a_vals[attr->a_numvals]);
if ( attr->a_nvals != attr->a_vals )
- BER_BVZERO(&attr->a_vals[attr->a_numvals]);
+ BER_BVZERO(&attr->a_nvals[attr->a_numvals]);
}
+ attr->a_flags |= SLAP_ATTR_SORTED_VALS;
}
}
}