mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-02 00:04:12 +08:00
mdbx: fix unsigned-to-ptrdiff casting inside estimate().
Fixup after a238179c23e7378b2019de5229b2166cdfe515c7 Change-Id: I316e4aa1f41462fd0017f8e0a7f6d6e82aa4f3db
This commit is contained in:
parent
e6b48b613a
commit
8c8c86038a
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user