diff --git a/libraries/liblmdb/lmdb.h b/libraries/liblmdb/lmdb.h index 4800b6e..ff82017 100644 --- a/libraries/liblmdb/lmdb.h +++ b/libraries/liblmdb/lmdb.h @@ -1409,7 +1409,7 @@ int mdb_dcmp(MDB_txn *txn, MDB_dbi dbi, const MDB_val *a, const MDB_val *b); * * @param[in] msg The string to be printed. * @param[in] ctx An arbitrary context pointer for the callback. - * @return < 0 on failure, 0 on success. + * @return < 0 on failure, >= 0 on success. */ typedef int (MDB_msg_func)(const char *msg, void *ctx); @@ -1418,7 +1418,7 @@ typedef int (MDB_msg_func)(const char *msg, void *ctx); * @param[in] env An environment handle returned by #mdb_env_create() * @param[in] func A #MDB_msg_func function * @param[in] ctx Anything the message function needs - * @return < 0 on failure, 0 on success. + * @return < 0 on failure, >= 0 on success. */ int mdb_reader_list(MDB_env *env, MDB_msg_func *func, void *ctx); diff --git a/libraries/liblmdb/mdb.c b/libraries/liblmdb/mdb.c index ab77360..fbffdd6 100644 --- a/libraries/liblmdb/mdb.c +++ b/libraries/liblmdb/mdb.c @@ -8299,7 +8299,7 @@ int mdb_reader_list(MDB_env *env, MDB_msg_func *func, void *ctx) unsigned int i, rdrs; MDB_reader *mr; char buf[64]; - int first = 1; + int rc = 0, first = 1; if (!env || !func) return -1; @@ -8311,7 +8311,6 @@ int mdb_reader_list(MDB_env *env, MDB_msg_func *func, void *ctx) for (i=0; i