mirror of
https://github.com/isar/libmdbx.git
synced 2024-10-30 11:29:19 +08:00
mdbx: refine mdbx_cursor_eof().
Change-Id: I786c5f2eedb273f44fd2ef5065d200f63dfec84b
This commit is contained in:
parent
460eb64a6f
commit
71ae2aba8d
12
mdbx.c
12
mdbx.c
@ -366,7 +366,17 @@ int mdbx_cursor_eof(MDB_cursor *mc)
|
|||||||
if (unlikely(mc->mc_signature != MDBX_MC_SIGNATURE))
|
if (unlikely(mc->mc_signature != MDBX_MC_SIGNATURE))
|
||||||
return MDB_VERSION_MISMATCH;
|
return MDB_VERSION_MISMATCH;
|
||||||
|
|
||||||
return (mc->mc_flags & C_INITIALIZED) ? 0 : 1;
|
if ((mc->mc_flags & C_INITIALIZED) == 0)
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
if (mc->mc_snum == 0)
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
if ((mc->mc_flags & C_EOF)
|
||||||
|
&& mc->mc_ki[mc->mc_top] >= NUMKEYS(mc->mc_pg[mc->mc_top]))
|
||||||
|
return 1;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int mdbx_is_samedata(const MDB_val* a, const MDB_val* b) {
|
static int mdbx_is_samedata(const MDB_val* a, const MDB_val* b) {
|
||||||
|
Loading…
Reference in New Issue
Block a user