Fixed typo in libmdb Hakefile and removed duplicate invariant checking.
authorSimon Gerber <simon.gerber@inf.ethz.ch>
Fri, 5 Dec 2014 15:01:59 +0000 (16:01 +0100)
committerSimon Gerber <simon.gerber@inf.ethz.ch>
Fri, 5 Dec 2014 15:32:28 +0000 (16:32 +0100)
lib/mdb/Hakefile
lib/mdb/mdb_tree.c

index 782e676..c918424 100644 (file)
@@ -55,7 +55,7 @@
            if Config.mdb_trace_no_recursive then "-DMDB_TRACE_NO_RECURSVIE" else "",
            if Config.mdb_fail_invariants then "-DMDB_FAIL_INVARIANTS" else "",
            if Config.mdb_recheck_invariants then "-DMDB_RECHECK_INVARIANTS" else "",
-           if Config.mdb_check_invariants_user then "-DMDB_CHECK_INVARIANTS" else ""
+           if Config.mdb_check_invariants then "-DMDB_CHECK_INVARIANTS" else ""
       ]
     }
 ]
index 2a11fac..4779a81 100644 (file)
@@ -58,6 +58,10 @@ mdb_dump_and_fail(struct cte *cte, enum mdb_invariant failure)
 
 // PP switch to toggle recursive checking of invariants by default
 #ifdef MDB_RECHECK_INVARIANTS
+// disable toplevel invariants checks as we're doing them anyway
+#undef CHECK_INVARIANTS
+#define CHECK_INVARIANTS ((void)0)
+
 #define CHECK_INVARIANTS_SUB(cte) mdb_check_subtree_invariants(cte)
 #else
 #define CHECK_INVARIANTS_SUB(cte) ((void)0)