From: Hallvard Furuseth Date: Thu, 18 Apr 2013 06:00:03 +0000 (+0200) Subject: Tweak comments/readability. X-Git-Tag: OPENLDAP_REL_ENG_2_4_36~69^2~4 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9dd61011fe18a46400d9c33db32a45193802f26a;p=openldap Tweak comments/readability. Show MDB_PERSISTENT/MDB_VALID/DB_VALID relationship. mdb_txn_renew0(): Remove obsolete "cannot fail" comment. --- diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index 71575d604b..d3bb4da8ce 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -748,7 +748,8 @@ typedef struct MDB_db { } MDB_db; /** mdb_dbi_open flags */ -#define PERSISTENT_FLAGS 0x7fff +#define MDB_VALID 0x8000 /**< DB handle is valid, for me_dbflags */ +#define PERSISTENT_FLAGS (0xffff & ~(MDB_VALID)) #define VALID_FLAGS (MDB_REVERSEKEY|MDB_DUPSORT|MDB_INTEGERKEY|MDB_DUPFIXED|\ MDB_INTEGERDUP|MDB_REVERSEDUP|MDB_CREATE) @@ -832,8 +833,7 @@ struct MDB_txn { #define DB_DIRTY 0x01 /**< DB was written in this txn */ #define DB_STALE 0x02 /**< DB record is older than txnID */ #define DB_NEW 0x04 /**< DB handle opened in this txn */ -#define DB_VALID 0x08 /**< DB handle is valid */ -#define MDB_VALID 0x8000 /**< DB handle is valid, for me_dbflags */ +#define DB_VALID 0x08 /**< DB handle is valid, see also #MDB_VALID */ /** @} */ /** In write txns, array of cursors for each DB */ MDB_cursor **mt_cursors; @@ -1772,9 +1772,7 @@ mdb_txn_reset0(MDB_txn *txn); /** Common code for #mdb_txn_begin() and #mdb_txn_renew(). * @param[in] txn the transaction handle to initialize - * @return 0 on success, non-zero on failure. This can only - * fail for read-only transactions, and then only if the - * reader table is full. + * @return 0 on success, non-zero on failure. */ static int mdb_txn_renew0(MDB_txn *txn)