From c84fe85f9e2f778c6575afb9efeda970aabf400c Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Wed, 18 Nov 2009 12:05:27 -0500 Subject: Filter by id range before actually storing entries. This way we do not need to check for id ranges on every search. --- server/util/util.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'server/util/util.h') diff --git a/server/util/util.h b/server/util/util.h index 661bcebb9..3ca43a409 100644 --- a/server/util/util.h +++ b/server/util/util.h @@ -152,6 +152,9 @@ errno_t set_debug_file_from_fd(const int fd); } \ } while (0) +#define OUT_OF_ID_RANGE(id, min, max) \ + (id == 0 || (min && (id < min)) || (max && (id > max))) + #include "util/dlinklist.h" /* From debug.c */ -- cgit