]> git.sur5r.net Git - openldap/commitdiff
candidate check using new macro from Kurt
authorPierangelo Masarati <ando@openldap.org>
Tue, 2 Oct 2001 19:15:05 +0000 (19:15 +0000)
committerPierangelo Masarati <ando@openldap.org>
Tue, 2 Oct 2001 19:15:05 +0000 (19:15 +0000)
servers/slapd/back-bdb/search.c

index f3f1d2bd2149269e547af9c7d1916815b7ed0ade..d426aaf113a48f9ea23ba2279a8931ea00e6a510 100644 (file)
@@ -233,11 +233,7 @@ bdb_search(
 
        /* if not root and candidates exceed to-be-checked entries, abort */
        if ( !isroot && limit->lms_s_unchecked != -1 ) {
-               unsigned long n = 
-                       1 + (BDB_IDL_IS_RANGE( candidates ) ? candidates[ 2 ] :
-                               candidates[ candidates[ 0 ] ])-candidates[ 1 ];
-               
-               if ( n > limit->lms_s_unchecked ) {
+               if ( BDB_IDL_N(candidates) > limit->lms_s_unchecked ) {
                        send_search_result( conn, op, 
                                        LDAP_UNWILLING_TO_PERFORM,
                                        NULL, NULL, NULL, NULL, 0 );