From 2069092aa5237136b1851fb1ce34c868597d99cd Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Wed, 24 Oct 2007 10:34:04 +0000 Subject: [PATCH] don't compute lengths twice --- servers/slapd/sets.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 ] ) ) { -- 2.39.5