mdbx: fix assertions inside pnl_search().

Change-Id: I735e54823b64a1ca03d7132c9ccc4e443d9b25a5
This commit is contained in:
Leonid Yuriev 2019-10-04 15:52:15 +03:00
parent aa92d6b7e7
commit d9e1d7f23a

View File

@ -1234,9 +1234,9 @@ static __noinline __hot unsigned mdbx_pnl_search(MDBX_PNL pnl, pgno_t id) {
pgno_t *end = begin + MDBX_PNL_SIZE(pnl);
assert(it >= begin && it <= end);
if (it != begin)
assert(it[-1] < id);
assert(MDBX_PNL_ORDERED(it[-1], id));
if (it != end)
assert(it[0] >= id);
assert(!MDBX_PNL_ORDERED(it[0], id));
return (unsigned)(it - begin);
}