8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-24 07:23:03 +01:00

Backported Adriano's correction.

This commit is contained in:
dimitr 2011-02-02 08:15:27 +00:00
parent d1df5354f6
commit 9755df067e

View File

@ -113,10 +113,10 @@
#define DEBUG_REMAP_INTERVAL 5000
static ULONG debug_remap_count = 0;
#endif
#define CHECK(x) { if (!(x)) bug_assert ("consistency check", __LINE__); }
#define CHECK(x) do { if (!(x)) bug_assert ("consistency check", __LINE__); } while (false)
#else // DEV_BUILD
#define ASSERT_ACQUIRED
#define CHECK(x)
#define CHECK(x) do { } while (false)
#endif // DEV_BUILD
#ifdef DEBUG_LM
@ -1131,7 +1131,6 @@ void LockManager::acquire_shmem(SRQ_PTR owner_offset)
}
fb_assert(!m_sharedFileCreated);
++m_header->lhb_acquires;
if (prior_active > 0) {
++m_header->lhb_acquire_blocks;
@ -3522,7 +3521,7 @@ void LockManager::validate_lock(const SRQ_PTR lock_ptr, USHORT freed, const SRQ_
// The lbl_count's should never roll over to be negative
for (ULONG i = 0; i < FB_NELEM(lock->lbl_counts); i++)
CHECK(!(lock->lbl_counts[i] & 0x8000))
CHECK(!(lock->lbl_counts[i] & 0x8000));
// The count of pending locks should never roll over to be negative
CHECK(!(lock->lbl_pending_lrq_count & 0x8000));