]> git.ipfire.org Git - thirdparty/git.git/commit
reftable/block: adjust type of the restart length
authorPatrick Steinhardt <ps@pks.im>
Mon, 20 Jan 2025 16:17:25 +0000 (17:17 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 21 Jan 2025 22:20:30 +0000 (14:20 -0800)
commitb1e4b6f4dc27481e8c07acc2e7629ae206d25f6c
tree3778e007fb96dec24aaa4c233c2f170ccb4f2b33
parentffe664366890f252ad14e87c987c57e080182bca
reftable/block: adjust type of the restart length

The restart length is tracked as a positive integer even though it
cannot ever be negative. Furthermore, it is effectively capped via the
MAX_RESTARTS variable.

Adjust the type of the variable to be `uint32_t`. While this type is
excessive given that MAX_RESTARTS fits into an `uint16_t`, other places
already use 32 bit integers for restarts, so this type is being more
consistent.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
reftable/block.c
reftable/reftable-writer.h