From d334ec71a03e7c4ff16231bbb7f1d4bf95751b19 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Fri, 3 Aug 2007 19:21:07 +0000 Subject: [PATCH] cleanup --- servers/slapd/entry.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/servers/slapd/entry.c b/servers/slapd/entry.c index c2fd04ed59..213b9f129c 100644 --- a/servers/slapd/entry.c +++ b/servers/slapd/entry.c @@ -100,6 +100,8 @@ str2entry( char *s ) return str2entry2( s, 1 ); } +#define bvcasematch(bv1, bv2) (ber_bvstrcasecmp(bv1, bv2) == 0) + Entry * str2entry2( char *s, int checkvals ) { @@ -180,9 +182,7 @@ str2entry2( char *s, int checkvals ) continue; } - if ( type[i].bv_len == dn_bv.bv_len && - strcasecmp( type[i].bv_val, dn_bv.bv_val ) == 0 ) { - + if ( bvcasematch( &type[i], &dn_bv ) ) { if ( e->e_dn != NULL ) { Debug( LDAP_DEBUG_ANY, "str2entry: " "entry %ld has multiple DNs \"%s\" and \"%s\"\n", @@ -212,8 +212,6 @@ str2entry2( char *s, int checkvals ) goto fail; } -#define bvcasematch(bv1, bv2) ( ((bv1)->bv_len == (bv2)->bv_len) && (strncasecmp((bv1)->bv_val, (bv2)->bv_val, (bv1)->bv_len) == 0) ) - /* Make sure all attributes with multiple values are contiguous */ if ( checkvals ) { int j, k;