From 2abf80a1996e7580076bcc13f64e4298fd3b3914 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9B=D0=B5=D0=BE=D0=BD=D0=B8=D0=B4=20=D0=AE=D1=80=D1=8C?= =?UTF-8?q?=D0=B5=D0=B2=20=28Leonid=20Yuriev=29?= Date: Sun, 14 May 2023 01:07:15 +0300 Subject: [PATCH] =?UTF-8?q?mdbx-test-extra:=20=D1=83=D1=81=D1=82=D1=80?= =?UTF-8?q?=D0=B0=D0=BD=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=BC=D0=B8=D0=BD=D0=BE?= =?UTF-8?q?=D1=80=D0=BD=D1=8B=D1=85=20=D0=BF=D1=80=D0=B5=D0=B4=D1=83=D0=BF?= =?UTF-8?q?=D1=80=D0=B5=D0=B6=D0=B4=D0=B5=D0=BD=D0=B8=D0=B9=20=D1=81=D1=82?= =?UTF-8?q?=D0=B0=D1=80=D1=8B=D1=85=20=D0=BA=D0=BE=D0=BC=D0=BF=D0=B8=D0=BB?= =?UTF-8?q?=D1=8F=D1=82=D0=BE=D1=80=D0=BE=D0=B2.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test/extra/upsert_alldups.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/test/extra/upsert_alldups.c b/test/extra/upsert_alldups.c index 9380865f..e486ae6e 100644 --- a/test/extra/upsert_alldups.c +++ b/test/extra/upsert_alldups.c @@ -12,8 +12,8 @@ #include static int dump(MDBX_cursor *cur) { - MDBX_val key = {}; - MDBX_val data = {}; + MDBX_val key = {NULL, 0}; + MDBX_val data = {NULL, 0}; int rc = mdbx_cursor_get(cur, &key, &data, MDBX_FIRST); while (rc == 0) { @@ -25,15 +25,14 @@ static int dump(MDBX_cursor *cur) { } static int clear(MDBX_cursor *cur) { - MDBX_val key = {}; - MDBX_val data = {}; + MDBX_val key = {NULL, 0}; + MDBX_val data = {NULL, 0}; int rc = mdbx_cursor_get(cur, &key, &data, MDBX_FIRST); while (rc == 0) { rc = mdbx_cursor_del(cur, MDBX_ALLDUPS); - if (rc) { + if (rc) return rc; - } rc = mdbx_cursor_get(cur, &key, &data, MDBX_NEXT); } return (rc == MDBX_NOTFOUND) ? 0 : rc;