From 84b4883f00a8e6f857b88f6ddb3c7fd3831232e6 Mon Sep 17 00:00:00 2001 From: Leo Yuriev Date: Wed, 5 Jul 2017 19:38:22 +0300 Subject: [PATCH] mdbx: fix returning MDBX-errors after the merge. Change-Id: Id49b7f341749709cdee476c88c1066e76b6937c1 --- src/mdbx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mdbx.c b/src/mdbx.c index 5182c2bf..3a168702 100644 --- a/src/mdbx.c +++ b/src/mdbx.c @@ -11182,16 +11182,16 @@ int mdbx_cursor_put_attr(MDBX_cursor *cursor, MDBX_val *key, MDBX_val *data, int mdbx_set_attr(MDBX_txn *txn, MDBX_dbi dbi, MDBX_val *key, MDBX_val *data, mdbx_attr_t attr) { if (unlikely(!key || !txn)) - return EINVAL; + return MDBX_EINVAL; if (unlikely(txn->mt_signature != MDBX_MT_SIGNATURE)) return MDBX_VERSION_MISMATCH; if (unlikely(!TXN_DBI_EXIST(txn, dbi, DB_USRVALID))) - return EINVAL; + return MDBX_EINVAL; if (unlikely(txn->mt_flags & (MDBX_TXN_RDONLY | MDBX_TXN_BLOCKED))) - return (txn->mt_flags & MDBX_TXN_RDONLY) ? EACCES : MDBX_BAD_TXN; + return (txn->mt_flags & MDBX_TXN_RDONLY) ? MDBX_EACCESS : MDBX_BAD_TXN; MDBX_cursor mc; MDBX_xcursor mx;