]> git.sur5r.net Git - openldap/commitdiff
Fix P_INVALID def
authorHoward Chu <hyc@symas.com>
Tue, 28 Jun 2011 09:57:02 +0000 (02:57 -0700)
committerHoward Chu <hyc@symas.com>
Tue, 28 Jun 2011 09:57:02 +0000 (02:57 -0700)
libraries/libmdb/mdb.c
libraries/libmdb/mtest.c

index 09d67692ff1191f4ddbff831670774b99ed03671..c5c6f0ac29f7af294007b241188c81ab6d6f9a78 100644 (file)
@@ -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))
 
index 726c8ed954500bc20bb392996b4eac96b1a6cef3..b6316d4d5c82e107427b548376915c7649bb3f34 100644 (file)
@@ -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) {