@@ -5082,15 +5082,12 @@ static void
5082
5082
mdb_cursor_pop (MDB_cursor * mc )
5083
5083
{
5084
5084
if (mc -> mc_snum ) {
5085
- #if MDB_DEBUG
5086
- MDB_page * top = mc -> mc_pg [mc -> mc_top ];
5087
- #endif
5085
+ DPRINTF (( "popping page %" Z "u off db %d cursor %p" ,
5086
+ mc -> mc_pg [mc -> mc_top ]-> mp_pgno , DDBI ( mc ), ( void * ) mc )) ;
5087
+
5088
5088
mc -> mc_snum -- ;
5089
5089
if (mc -> mc_snum )
5090
5090
mc -> mc_top -- ;
5091
-
5092
- DPRINTF (("popped page %" Z "u off db %d cursor %p" , top -> mp_pgno ,
5093
- DDBI (mc ), (void * ) mc ));
5094
5091
}
5095
5092
}
5096
5093
@@ -8556,7 +8553,7 @@ mdb_put(MDB_txn *txn, MDB_dbi dbi,
8556
8553
if (!key || !data || dbi == FREE_DBI || !TXN_DBI_EXIST (txn , dbi ))
8557
8554
return EINVAL ;
8558
8555
8559
- if (( flags & (MDB_NOOVERWRITE |MDB_NODUPDATA |MDB_RESERVE |MDB_APPEND |MDB_APPENDDUP )) != flags )
8556
+ if (flags & ~ (MDB_NOOVERWRITE |MDB_NODUPDATA |MDB_RESERVE |MDB_APPEND |MDB_APPENDDUP ))
8560
8557
return EINVAL ;
8561
8558
8562
8559
mdb_cursor_init (& mc , txn , dbi , & mx );
@@ -9126,7 +9123,7 @@ mdb_env_copy(MDB_env *env, const char *path)
9126
9123
int ESECT
9127
9124
mdb_env_set_flags (MDB_env * env , unsigned int flag , int onoff )
9128
9125
{
9129
- if (( flag & CHANGEABLE ) != flag )
9126
+ if (flag & ~ CHANGEABLE )
9130
9127
return EINVAL ;
9131
9128
if (onoff )
9132
9129
env -> me_flags |= flag ;
@@ -9275,7 +9272,7 @@ int mdb_dbi_open(MDB_txn *txn, const char *name, unsigned int flags, MDB_dbi *db
9275
9272
unsigned int unused = 0 , seq ;
9276
9273
size_t len ;
9277
9274
9278
- if (( flags & VALID_FLAGS ) != flags )
9275
+ if (flags & ~ VALID_FLAGS )
9279
9276
return EINVAL ;
9280
9277
if (txn -> mt_flags & MDB_TXN_ERROR )
9281
9278
return MDB_BAD_TXN ;
0 commit comments