mdbx: fix Coverity warnings.

Change-Id: I70734c5bf7e3d1088522c0dccd88948865f8192f
This commit is contained in:
Leonid Yuriev 2019-10-06 19:05:08 +03:00
parent 0a5dcdb120
commit 6efe0686c9

View File

@ -11919,9 +11919,9 @@ static int mdbx_page_split(MDBX_cursor *mc, const MDBX_val *newkey,
unsigned newindx = mc->mc_ki[mc->mc_top]; unsigned newindx = mc->mc_ki[mc->mc_top];
unsigned nkeys = NUMKEYS(mp); unsigned nkeys = NUMKEYS(mp);
if (mdbx_audit_enabled()) { if (mdbx_audit_enabled()) {
int err = mdbx_cursor_check(mc, true); rc = mdbx_cursor_check(mc, true);
if (unlikely(err != MDBX_SUCCESS)) if (unlikely(rc != MDBX_SUCCESS))
return err; return rc;
} }
mdbx_debug("-----> splitting %s page %" PRIaPGNO mdbx_debug("-----> splitting %s page %" PRIaPGNO
@ -12123,12 +12123,12 @@ static int mdbx_page_split(MDBX_cursor *mc, const MDBX_val *newkey,
mdbx_debug("separator is %d [%s]", split_indx, DKEY(&sepkey)); mdbx_debug("separator is %d [%s]", split_indx, DKEY(&sepkey));
if (mdbx_audit_enabled()) { if (mdbx_audit_enabled()) {
int err = mdbx_cursor_check(mc, true); rc = mdbx_cursor_check(mc, true);
if (unlikely(err != MDBX_SUCCESS)) if (unlikely(rc != MDBX_SUCCESS))
return err; goto done;
err = mdbx_cursor_check(&mn, true); rc = mdbx_cursor_check(&mn, true);
if (unlikely(err != MDBX_SUCCESS)) if (unlikely(rc != MDBX_SUCCESS))
return err; goto done;
} }
/* Copy separator key to the parent. */ /* Copy separator key to the parent. */
@ -12145,9 +12145,9 @@ static int mdbx_page_split(MDBX_cursor *mc, const MDBX_val *newkey,
goto done; goto done;
mdbx_cassert(mc, mc->mc_snum - snum == mc->mc_db->md_depth - depth); mdbx_cassert(mc, mc->mc_snum - snum == mc->mc_db->md_depth - depth);
if (mdbx_audit_enabled()) { if (mdbx_audit_enabled()) {
int err = mdbx_cursor_check(mc, true); rc = mdbx_cursor_check(mc, true);
if (unlikely(err != MDBX_SUCCESS)) if (unlikely(rc != MDBX_SUCCESS))
return err; goto done;
} }
/* root split? */ /* root split? */