From a4c3626267dcaf2565a1ddf2730a86ff8abb12da Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Tue, 28 Jun 2011 02:57:02 -0700 Subject: [PATCH] Fix P_INVALID def --- libraries/libmdb/mdb.c | 2 +- libraries/libmdb/mtest.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/libmdb/mdb.c b/libraries/libmdb/mdb.c index 09d67692ff..c5c6f0ac29 100644 --- a/libraries/libmdb/mdb.c +++ b/libraries/libmdb/mdb.c @@ -40,7 +40,7 @@ #define MDB_VERSION 1 #define MAXKEYSIZE 255 -#define P_INVALID 0xFFFFFFFF +#define P_INVALID (~0L) #define F_ISSET(w, f) (((w) & (f)) == (f)) diff --git a/libraries/libmdb/mtest.c b/libraries/libmdb/mtest.c index 726c8ed954..b6316d4d5c 100644 --- a/libraries/libmdb/mtest.c +++ b/libraries/libmdb/mtest.c @@ -53,10 +53,10 @@ int main(int argc,char * argv[]) mdb_cursor_close(cursor); j=0; + key.mv_data = sval; for (i= count - 1; i > -1; i-= (random()%5)) { j++; rc = mdb_txn_begin(env, 0, &txn); - key.mv_data = sval; sprintf(sval, "%03x ", values[i]); rc = mdb_del(db, txn, &key, NULL); if (rc) { -- 2.39.5