From 7e1e1421048fbaf482aaf272f658f6b811b015ea Mon Sep 17 00:00:00 2001 From: Leonid Yuriev Date: Sun, 7 Jul 2019 01:47:10 +0300 Subject: [PATCH] mdbx-chk: fix/refine error handling for sub-DBs. Change-Id: I42460793bbe47815add1b3f61f3746f671a749d9 --- src/tools/mdbx_chk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tools/mdbx_chk.c b/src/tools/mdbx_chk.c index 67ccb3d7..8374e840 100644 --- a/src/tools/mdbx_chk.c +++ b/src/tools/mdbx_chk.c @@ -702,7 +702,7 @@ static int process_db(MDBX_dbi dbi_handle, char *dbi_name, visitor *handler, if (handler) { rc = handler(record_count, &key, &data); - if (rc) + if (MDBX_IS_ERROR(rc)) goto bailout; } @@ -735,7 +735,7 @@ bailout: } mdbx_cursor_close(mc); - return rc || problems_count; + return (rc || problems_count) ? MDBX_RESULT_TRUE : MDBX_SUCCESS; } static void usage(char *prog) {