mirror of
https://github.com/isar/libmdbx.git
synced 2025-07-20 15:44:44 +08:00
mdbx: косметический рефакторинг txn_renew()
.
This commit is contained in:
parent
0c70b548e8
commit
e9d47291b0
@ -214,7 +214,9 @@ int txn_renew(MDBX_txn *txn, unsigned flags) {
|
||||
if (unlikely(env->flags & ENV_FATAL_ERROR)) {
|
||||
WARNING("%s", "environment had fatal error, must shutdown!");
|
||||
rc = MDBX_PANIC;
|
||||
} else {
|
||||
goto bailout;
|
||||
}
|
||||
|
||||
const size_t size_bytes = pgno2bytes(env, txn->geo.end_pgno);
|
||||
const size_t used_bytes = pgno2bytes(env, txn->geo.first_unallocated);
|
||||
const size_t required_bytes = (txn->flags & MDBX_TXN_RDONLY) ? used_bytes : size_bytes;
|
||||
@ -321,7 +323,7 @@ int txn_renew(MDBX_txn *txn, unsigned flags) {
|
||||
}
|
||||
dxb_sanitize_tail(env, txn);
|
||||
return MDBX_SUCCESS;
|
||||
}
|
||||
|
||||
bailout:
|
||||
tASSERT(txn, rc != MDBX_SUCCESS);
|
||||
txn_end(txn, TXN_END_SLOT | TXN_END_FAIL_BEGIN);
|
||||
|
Loading…
x
Reference in New Issue
Block a user