From 5ef56b437e2163e14b7e761bcd2e2700fe007c7d Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Mon, 17 Sep 2012 07:01:28 -0700 Subject: [PATCH] More for ab04c50a32275e216b82edaeeed50208cf49336b Use explicit MDB_RDONLY flag --- libraries/libmdb/mdb_stat.c | 2 +- libraries/libmdb/mdb_stata.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/libmdb/mdb_stat.c b/libraries/libmdb/mdb_stat.c index 6007510..97bd8d4 100644 --- a/libraries/libmdb/mdb_stat.c +++ b/libraries/libmdb/mdb_stat.c @@ -38,7 +38,7 @@ int main(int argc,char * argv[]) printf("mdb_env_open failed, error %d\n", rc); goto env_close; } - rc = mdb_txn_begin(env, NULL, 1, &txn); + rc = mdb_txn_begin(env, NULL, MDB_RDONLY, &txn); if (rc) { printf("mdb_txn_begin failed, error %d\n", rc); goto env_close; diff --git a/libraries/libmdb/mdb_stata.c b/libraries/libmdb/mdb_stata.c index f8b2fe5..7cfebb4 100644 --- a/libraries/libmdb/mdb_stata.c +++ b/libraries/libmdb/mdb_stata.c @@ -36,7 +36,7 @@ int main(int argc,char * argv[]) printf("mdb_env_open failed, error %d\n", rc); goto env_close; } - rc = mdb_txn_begin(env, NULL, 1, &txn); + rc = mdb_txn_begin(env, NULL, MDB_RDONLY, &txn); if (rc) { printf("mdb_txn_begin failed, error %d\n", rc); goto env_close;