rbyd: Renamed LFS_ASSERTRBYDBALANCE -> LFS_DEBUGRBYDBALANCE
This name helps avoid the mistake the that LFS_ASSERTRBYDBALANCE is cheap/free like other asserts, which is very much not true. LFS_DEBUGRBYDBALANCE is expensive and should only be used for testing.
This commit is contained in:
@@ -2939,7 +2939,7 @@ static int lfsr_rbyd_fetch_(lfs_t *lfs,
|
||||
|
||||
// asserting rbyd balance? check that all branches in the rbyd have
|
||||
// the same height
|
||||
#ifdef LFS_ASSERTRBYDBALANCE
|
||||
#ifdef LFS_DEBUGRBYDBALANCE
|
||||
lfsr_srid_t rid = -1;
|
||||
lfsr_tag_t tag = 0;
|
||||
lfs_ssize_t height = -1;
|
||||
|
||||
+3
-3
@@ -168,10 +168,10 @@ extern "C"
|
||||
#define LFS_IFDEF_GC(a, b) (b)
|
||||
#endif
|
||||
|
||||
#ifdef LFS_ASSERTRBYDBALANCE
|
||||
#define LFS_IFDEF_ASSERTRBYDBALANCE(a, b) (a)
|
||||
#ifdef LFS_DEBUGRBYDBALANCE
|
||||
#define LFS_IFDEF_DEBUGRBYDBALANCE(a, b) (a)
|
||||
#else
|
||||
#define LFS_IFDEF_ASSERTRBYDBALANCE(a, b) (b)
|
||||
#define LFS_IFDEF_DEBUGRBYDBALANCE(a, b) (b)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user