From: Cyrill Gorcunov <gorcunov@gmail.com>
To: tml <tarantool-patches@dev.tarantool.org>
Subject: [Tarantool-patches] [PATCH] box/memtx: use uint32_t for number of indices
Date: Fri, 15 May 2020 14:12:31 +0300 [thread overview]
Message-ID: <20200515111231.50740-1-gorcunov@gmail.com> (raw)
The member is defined as unsigned 32 bit value,
so we have to use an exactly the same type here.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---
src/box/memtx_engine.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/box/memtx_engine.c b/src/box/memtx_engine.c
index 537f574ac..6180e5b5b 100644
--- a/src/box/memtx_engine.c
+++ b/src/box/memtx_engine.c
@@ -349,7 +349,7 @@ memtx_engine_rollback_statement(struct engine *engine, struct txn *txn,
return;
struct space *space = stmt->space;
struct memtx_space *memtx_space = (struct memtx_space *)space;
- int index_count;
+ uint32_t index_count;
/* Only roll back the changes if they were made. */
if (stmt->engine_savepoint == NULL)
@@ -362,7 +362,7 @@ memtx_engine_rollback_statement(struct engine *engine, struct txn *txn,
else
panic("transaction rolled back during snapshot recovery");
- for (int i = 0; i < index_count; i++) {
+ for (uint32_t i = 0; i < index_count; i++) {
struct tuple *unused;
struct index *index = space->index[i];
/* Rollback must not fail. */
--
2.26.2
next reply other threads:[~2020-05-15 11:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-15 11:12 Cyrill Gorcunov [this message]
2020-05-18 8:28 ` Kirill Yukhin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200515111231.50740-1-gorcunov@gmail.com \
--to=gorcunov@gmail.com \
--cc=tarantool-patches@dev.tarantool.org \
--subject='Re: [Tarantool-patches] [PATCH] box/memtx: use uint32_t for number of indices' \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox