mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-01 23:54:12 +08:00
mdbx: fix extra casting inside mdbx_limits_dbsize_max()
.
This commit is contained in:
parent
79e1cc3bbc
commit
5aeb7ccf25
@ -21861,8 +21861,7 @@ __cold intptr_t mdbx_limits_dbsize_max(intptr_t pagesize) {
|
|||||||
|
|
||||||
STATIC_ASSERT(MAX_MAPSIZE < INTPTR_MAX);
|
STATIC_ASSERT(MAX_MAPSIZE < INTPTR_MAX);
|
||||||
const uint64_t limit = (1 + (uint64_t)MAX_PAGENO) * pagesize;
|
const uint64_t limit = (1 + (uint64_t)MAX_PAGENO) * pagesize;
|
||||||
return (limit < (intptr_t)MAX_MAPSIZE) ? (intptr_t)limit
|
return (limit < MAX_MAPSIZE) ? (intptr_t)limit : (intptr_t)MAX_MAPSIZE;
|
||||||
: (intptr_t)MAX_MAPSIZE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
__cold intptr_t mdbx_limits_txnsize_max(intptr_t pagesize) {
|
__cold intptr_t mdbx_limits_txnsize_max(intptr_t pagesize) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user