summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--source3/lib/dbwrap/dbwrap_open.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/source3/lib/dbwrap/dbwrap_open.c b/source3/lib/dbwrap/dbwrap_open.c
index ee5ec74983..3c8756b0bc 100644
--- a/source3/lib/dbwrap/dbwrap_open.c
+++ b/source3/lib/dbwrap/dbwrap_open.c
@@ -68,15 +68,7 @@ struct db_context *db_open(TALLOC_CTX *mem_ctx,
const char *sockname;
#endif
- switch (lock_order) {
- case DBWRAP_LOCK_ORDER_1:
- case DBWRAP_LOCK_ORDER_2:
- case DBWRAP_LOCK_ORDER_3:
- break;
- default:
- /*
- * Only allow the 3 levels ctdb gives us.
- */
+ if (!DBWRAP_LOCK_ORDER_VALID(lock_order)) {
errno = EINVAL;
return NULL;
}