[Tarantool-patches] [PATCH] box/memtx: use uint32_t for number of indices
Cyrill Gorcunov
gorcunov at gmail.com
Fri May 15 14:12:31 MSK 2020
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 at 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
More information about the Tarantool-patches
mailing list