instead of the hand written test.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Feb 7 18:05:51 CET 2014 on sn-devel-104
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;
}