From: Pierangelo Masarati Date: Tue, 2 Oct 2001 19:15:05 +0000 (+0000) Subject: candidate check using new macro from Kurt X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~1012 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8a3768276a44cb1ce11936879b78911c3244a01a;p=openldap candidate check using new macro from Kurt --- 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 );