Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH] box/memtx: use uint32_t for number of indices
@ 2020-05-15 11:12 Cyrill Gorcunov
  2020-05-18  8:28 ` Kirill Yukhin
  0 siblings, 1 reply; 2+ messages in thread
From: Cyrill Gorcunov @ 2020-05-15 11:12 UTC (permalink / raw)
  To: tml

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-05-18  8:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-15 11:12 [Tarantool-patches] [PATCH] box/memtx: use uint32_t for number of indices Cyrill Gorcunov
2020-05-18  8:28 ` Kirill Yukhin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox