From: Pierangelo Masarati Date: Wed, 24 Oct 2007 10:34:04 +0000 (+0000) Subject: don't compute lengths twice X-Git-Tag: OPENLDAP_REL_ENG_2_4_9~20^2~483 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2069092aa5237136b1851fb1ce34c868597d99cd;p=openldap don't compute lengths twice --- diff --git a/servers/slapd/sets.c b/servers/slapd/sets.c index 3393e83bf3..eab6401f66 100644 --- a/servers/slapd/sets.c +++ b/servers/slapd/sets.c @@ -239,11 +239,13 @@ slap_set_join( /* dup the shortest */ if ( llen < rlen ) { + last = llen; set = set_dup( cp, lset, SLAP_SET_LREF2REF( op_flags ) ); lset = NULL; sset = rset; } else { + last = rlen; set = set_dup( cp, rset, SLAP_SET_RREF2REF( op_flags ) ); rset = NULL; sset = lset; @@ -253,7 +255,6 @@ slap_set_join( break; } - last = slap_set_size( set ); for ( i = 0; !BER_BVISNULL( &set[ i ] ); i++ ) { for ( j = 0; !BER_BVISNULL( &sset[ j ] ); j++ ) { if ( bvmatch( &set[ i ], &sset[ j ] ) ) {