mdbx: fix unsigned-to-ptrdiff casting inside estimate().

Fixup after a238179c23e7378b2019de5229b2166cdfe515c7

Change-Id: I316e4aa1f41462fd0017f8e0a7f6d6e82aa4f3db
This commit is contained in:
Leonid Yuriev 2020-05-12 23:32:06 +03:00
parent e6b48b613a
commit 8c8c86038a

View File

@ -17670,7 +17670,7 @@ __hot static ptrdiff_t estimate(const MDBX_db *db,
* level-N: branch-page(s) => scale = leaf-factor
* leaf-level: leaf-page(s) => scale = 1
*/
ptrdiff_t btree_power = db->md_depth - 2 - dr->level;
ptrdiff_t btree_power = (ptrdiff_t)db->md_depth - 2 - (ptrdiff_t)dr->level;
if (btree_power < 0)
return dr->diff;