mdbx-chk: fix/refine error handling for sub-DBs.

Change-Id: I42460793bbe47815add1b3f61f3746f671a749d9
This commit is contained in:
Leonid Yuriev 2019-07-07 01:47:10 +03:00
parent e2f37908b9
commit 7e1e142104

View File

@ -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) {