]> git.sur5r.net Git - openldap/commitdiff
don't compute lengths twice
authorPierangelo Masarati <ando@openldap.org>
Wed, 24 Oct 2007 10:34:04 +0000 (10:34 +0000)
committerPierangelo Masarati <ando@openldap.org>
Wed, 24 Oct 2007 10:34:04 +0000 (10:34 +0000)
servers/slapd/sets.c

index 3393e83bf3c3a17df4b1ce645615b23b99a7e63d..eab6401f664320fa6715e720fa87920fbe6d0c59 100644 (file)
@@ -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 ] ) ) {