From 8a3768276a44cb1ce11936879b78911c3244a01a Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Tue, 2 Oct 2001 19:15:05 +0000 Subject: [PATCH] candidate check using new macro from Kurt --- servers/slapd/back-bdb/search.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/servers/slapd/back-bdb/search.c b/servers/slapd/back-bdb/search.c index f3f1d2bd21..d426aaf113 100644 --- a/servers/slapd/back-bdb/search.c +++ b/servers/slapd/back-bdb/search.c @@ -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 ); -- 2.39.5