summaryrefslogtreecommitdiff
path: root/server/util
diff options
context:
space:
mode:
authorSimo Sorce <ssorce@redhat.com>2009-11-18 12:05:27 -0500
committerStephen Gallagher <sgallagh@redhat.com>2009-11-20 16:46:47 -0500
commitc84fe85f9e2f778c6575afb9efeda970aabf400c (patch)
tree4be8678a70bf0360d408fd1448f3d26b849b748d /server/util
parent7e4bf8856e9b65e612ca195a3b4f10bfb53a8259 (diff)
downloadsssd-c84fe85f9e2f778c6575afb9efeda970aabf400c.tar.gz
sssd-c84fe85f9e2f778c6575afb9efeda970aabf400c.tar.bz2
sssd-c84fe85f9e2f778c6575afb9efeda970aabf400c.zip
Filter by id range before actually storing entries.
This way we do not need to check for id ranges on every search.
Diffstat (limited to 'server/util')
-rw-r--r--server/util/util.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/util/util.h b/server/util/util.h
index 661bcebb..3ca43a40 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 */