git.samba.org
/
nivanova
/
samba-autobuild
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8dbb582
)
dbwrap: add DBWRAP_LOCK_ORDER_VALID()
author
Michael Adam
<obnox@samba.org>
Tue, 28 Jan 2014 10:54:06 +0000
(11:54 +0100)
committer
Stefan Metzmacher
<metze@samba.org>
Fri, 7 Feb 2014 15:06:07 +0000
(16:06 +0100)
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
lib/dbwrap/dbwrap_private.h
patch
|
blob
|
history
diff --git
a/lib/dbwrap/dbwrap_private.h
b/lib/dbwrap/dbwrap_private.h
index e131654321225f53afa6f883555ae9de114659b5..a6bad04971b7729d7b3b523174a906642a8d68ee 100644
(file)
--- 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__ */