From: Howard Chu Date: Mon, 17 Sep 2012 14:01:28 +0000 (-0700) Subject: More for ab04c50a32275e216b82edaeeed50208cf49336b X-Git-Tag: OPENLDAP_REL_ENG_2_4_33~17^2~1 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=5ef56b437e2163e14b7e761bcd2e2700fe007c7d;p=openldap More for ab04c50a32275e216b82edaeeed50208cf49336b Use explicit MDB_RDONLY flag --- diff --git a/libraries/libmdb/mdb_stat.c b/libraries/libmdb/mdb_stat.c index 6007510c6b..97bd8d4467 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 f8b2fe59a8..7cfebb4914 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;