From 0f3b82f6618e206baf2a5d335d4da36cfcf4fd4e Mon Sep 17 00:00:00 2001 From: Leonid Yuriev Date: Wed, 7 Oct 2020 21:59:30 +0300 Subject: [PATCH] mdbx: minor refine WITH_CURSOR_TRACKING macro. Change-Id: I61a4782ae76aed624fe37f7dde2b0ef7eb5dfb64 --- src/core.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/core.c b/src/core.c index 1be76e4e..4e102abb 100644 --- a/src/core.c +++ b/src/core.c @@ -3567,17 +3567,18 @@ static __maybe_unused void mdbx_page_list(MDBX_page *mp) { do { \ mdbx_cassert(&(mn), \ mn.mc_txn->mt_cursors != NULL /* must be not rdonly txt */); \ - MDBX_cursor mc_dummy, **tp = &(mn).mc_txn->mt_cursors[mn.mc_dbi]; \ + MDBX_cursor mc_dummy; \ + MDBX_cursor **tracking_head = &(mn).mc_txn->mt_cursors[mn.mc_dbi]; \ MDBX_cursor *tracked = &(mn); \ if ((mn).mc_flags & C_SUB) { \ mc_dummy.mc_flags = C_INITIALIZED; \ mc_dummy.mc_xcursor = (MDBX_xcursor *)&(mn); \ tracked = &mc_dummy; \ } \ - tracked->mc_next = *tp; \ - *tp = tracked; \ + tracked->mc_next = *tracking_head; \ + *tracking_head = tracked; \ { act; } \ - *tp = tracked->mc_next; \ + *tracking_head = tracked->mc_next; \ } while (0) int mdbx_cmp(const MDBX_txn *txn, MDBX_dbi dbi, const MDBX_val *a,