mdbx: minor refine cursor_put().

Use `rc2` variable to simplify register(s) allocation.

Change-Id: Ie47210a4b494e9aeaa8492830cfbcbbde02b485c
This commit is contained in:
Leonid Yuriev 2019-12-27 15:01:15 +03:00
parent 36c7d7a435
commit 7d1eff5116

View File

@ -11011,9 +11011,9 @@ int mdbx_cursor_put(MDBX_cursor *mc, MDBX_val *key, MDBX_val *data,
/* LY: add configurable threshold to keep reserve space */
dpages) {
if (!IS_DIRTY(omp) && (level || (env->me_flags & MDBX_WRITEMAP))) {
rc = mdbx_page_unspill(mc->mc_txn, omp, &omp);
if (unlikely(rc))
return rc;
rc2 = mdbx_page_unspill(mc->mc_txn, omp, &omp);
if (unlikely(rc2))
return rc2;
level = 0; /* dirty in this txn or clean */
}
/* Is it dirty? */
@ -11180,8 +11180,8 @@ int mdbx_cursor_put(MDBX_cursor *mc, MDBX_val *key, MDBX_val *data,
nested_dupdb.md_entries = page_numkeys(fp);
xdata.iov_len = sizeof(nested_dupdb);
xdata.iov_base = &nested_dupdb;
if ((rc = mdbx_page_alloc(mc, 1, &mp, MDBX_ALLOC_ALL)))
return rc;
if ((rc2 = mdbx_page_alloc(mc, 1, &mp, MDBX_ALLOC_ALL)))
return rc2;
mc->mc_db->md_leaf_pages += 1;
mdbx_cassert(mc, env->me_psize > olddata.iov_len);
offset = env->me_psize - (unsigned)olddata.iov_len;