mdbx: fix extra casting inside mdbx_limits_dbsize_max().

This commit is contained in:
Leonid Yuriev 2022-02-01 16:05:38 +03:00 committed by Леонид Юрьев (Leonid Yuriev)
parent 79e1cc3bbc
commit 5aeb7ccf25

View File

@ -21861,8 +21861,7 @@ __cold intptr_t mdbx_limits_dbsize_max(intptr_t pagesize) {
STATIC_ASSERT(MAX_MAPSIZE < INTPTR_MAX);
const uint64_t limit = (1 + (uint64_t)MAX_PAGENO) * pagesize;
return (limit < (intptr_t)MAX_MAPSIZE) ? (intptr_t)limit
: (intptr_t)MAX_MAPSIZE;
return (limit < MAX_MAPSIZE) ? (intptr_t)limit : (intptr_t)MAX_MAPSIZE;
}
__cold intptr_t mdbx_limits_txnsize_max(intptr_t pagesize) {