From c4ab31ddc9258e75525f3aee01ceedcd00ec8e90 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Mon, 7 Apr 2003 11:40:23 +0000 Subject: [PATCH] Cleanup previous --- servers/slapd/back-ldap/search.c | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/servers/slapd/back-ldap/search.c b/servers/slapd/back-ldap/search.c index d50f82ed80..fe2755c67a 100644 --- a/servers/slapd/back-ldap/search.c +++ b/servers/slapd/back-ldap/search.c @@ -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; ia_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; ia_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; } -- 2.39.5