diff options
author | Michael Adam <obnox@samba.org> | 2014-01-28 11:54:06 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2014-02-07 16:06:07 +0100 |
commit | 5e5a31bfb2de9ffa9829db1002118773a22ac9e4 (patch) | |
tree | 7d76c59eff62075298c41a06e521b4876c2dcbe7 /lib | |
parent | 8dbb58285b6590203d3c510c22cb6936fd642e5f (diff) | |
download | samba-5e5a31bfb2de9ffa9829db1002118773a22ac9e4.tar.gz samba-5e5a31bfb2de9ffa9829db1002118773a22ac9e4.tar.xz samba-5e5a31bfb2de9ffa9829db1002118773a22ac9e4.zip |
dbwrap: add DBWRAP_LOCK_ORDER_VALID()
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/dbwrap/dbwrap_private.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/dbwrap/dbwrap_private.h b/lib/dbwrap/dbwrap_private.h index e1316543212..a6bad04971b 100644 --- a/lib/dbwrap/dbwrap_private.h +++ b/lib/dbwrap/dbwrap_private.h @@ -72,5 +72,9 @@ struct db_context { #define DBWRAP_LOCK_ORDER_MIN DBWRAP_LOCK_ORDER_1 #define DBWRAP_LOCK_ORDER_MAX DBWRAP_LOCK_ORDER_3 +#define DBWRAP_LOCK_ORDER_VALID(order) \ + (((order) >= DBWRAP_LOCK_ORDER_MIN) && \ + ((order) <= DBWRAP_LOCK_ORDER_MAX)) + #endif /* __DBWRAP_PRIVATE_H__ */ |