mdbx: fix Coverity warnings (minor).

Change-Id: I4fa312f3a943f20e771f5149b2d8ad7c2520bb0e
This commit is contained in:
Leonid Yuriev 2018-09-19 22:04:34 +03:00
parent f7bd98a4ce
commit e73df34619

View File

@ -9849,7 +9849,7 @@ static int mdbx_node_move(MDBX_cursor *csrc, MDBX_cursor *cdst, int fromleft) {
mdbx_cassert(cdst, cdst->mc_top > 0);
if (cdst->mc_ki[cdst->mc_top - 1] != 0) {
MDBX_val key;
if (IS_LEAF2(psrc)) {
if (IS_LEAF2(pdst)) {
key.iov_len = pdst->mp_leaf2_ksize;
key.iov_base = LEAF2KEY(pdst, 0, key.iov_len);
} else {
@ -10890,7 +10890,7 @@ static int mdbx_page_split(MDBX_cursor *mc, const MDBX_val *newkey,
switch (PAGETYPE(rp)) {
case P_BRANCH: {
mdbx_cassert(mc, (nflags & (F_BIGDATA | F_SUBDATA | F_DUPDATA)) == 0);
mdbx_cassert(mc, newpgno != 0 || newpgno != P_INVALID);
mdbx_cassert(mc, newpgno != 0 && newpgno != P_INVALID);
rc = mdbx_node_add_branch(mc, 0, newkey, newpgno);
} break;
case P_LEAF: {
@ -10950,6 +10950,7 @@ static int mdbx_page_split(MDBX_cursor *mc, const MDBX_val *newkey,
} break;
case P_LEAF: {
mdbx_cassert(mc, pgno == 0);
mdbx_cassert(mc, rdata != NULL);
rc = mdbx_node_add_leaf(mc, n, &rkey, rdata, flags);
} break;
/* case P_LEAF | P_LEAF2: {