From: Kurt Zeilenga Date: Tue, 2 Oct 2001 19:04:12 +0000 (+0000) Subject: Add BDB_IDL_N() macro for ando X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~1013 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=773b1907d29e81e10e71f48f6727aed17464ba52;p=openldap Add BDB_IDL_N() macro for ando --- diff --git a/servers/slapd/back-bdb/idl.h b/servers/slapd/back-bdb/idl.h index c48a47dcd5..b0d414098d 100644 --- a/servers/slapd/back-bdb/idl.h +++ b/servers/slapd/back-bdb/idl.h @@ -57,7 +57,11 @@ #define BDB_IDL_ALL( bdb, ids ) BDB_IDL_RANGE( ids, 1, ((bdb)->bi_lastid) ) #define BDB_IDL_FIRST( ids ) ( ids[1] ) -#define BDB_IDL_LAST( ids ) ( BDB_IDL_IS_RANGE(ids) ? ids[2] : ids[ids[0]] ) +#define BDB_IDL_LAST( ids ) ( BDB_IDL_IS_RANGE(ids) \ + ? ids[2] : ids[ids[0]] ) + +#define BDB_IDL_N( ids ) ( BDB_IDL_IS_RANGE(ids) \ + ? (ids[2]-ids[1])+1 : ids[0] ) LDAP_BEGIN_DECL LDAP_END_DECL