From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-f195.google.com (mail-lj1-f195.google.com [209.85.208.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 6DEAC469710 for ; Fri, 15 May 2020 14:12:36 +0300 (MSK) Received: by mail-lj1-f195.google.com with SMTP id b6so1817474ljj.1 for ; Fri, 15 May 2020 04:12:36 -0700 (PDT) From: Cyrill Gorcunov Date: Fri, 15 May 2020 14:12:31 +0300 Message-Id: <20200515111231.50740-1-gorcunov@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH] box/memtx: use uint32_t for number of indices List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 --- 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