From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp39.i.mail.ru (smtp39.i.mail.ru [94.100.177.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 2CFF4469719 for ; Thu, 5 Mar 2020 14:36:18 +0300 (MSK) From: Serge Petrenko Date: Thu, 5 Mar 2020 14:36:00 +0300 Message-Id: <20200305113600.65203-1-sergepetrenko@tarantool.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH] vclock: refactor vclock map to use type uint32_t List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: v.shpilevoy@tarantool.org Cc: tarantool-patches@dev.tarantool.org We're using an unsigned int to hold vclock map, but there is no guarantee that unsigned int will be 4 bytes in size to fit all the 32 vclock components. So use uint32_t instead. --- No issue, discussed in scope of https://github.com/tarantool/tarantool/issues/4739 Branch: https://github.com/tarantool/tarantool/tree/sp/vclock-map-refactor src/box/vclock.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/box/vclock.h b/src/box/vclock.h index eb0fb5d8b..9b499513a 100644 --- a/src/box/vclock.h +++ b/src/box/vclock.h @@ -82,7 +82,7 @@ enum { /** Cluster vector clock */ struct vclock { /** Map of used components in lsn array */ - unsigned int map; + uint32_t map; /** Sum of all components of vclock. */ int64_t signature; int64_t lsn[VCLOCK_MAX]; -- 2.21.1 (Apple Git-122.3)