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>
This commit is contained in:
Patrick Steinhardt
2025-01-20 17:17:25 +01:00
committed by Junio C Hamano
parent ffe6643668
commit b1e4b6f4dc
2 changed files with 6 additions and 8 deletions

View File

@@ -84,7 +84,7 @@ struct reftable_block_stats {
/* total number of entries written */
int entries;
/* total number of key restarts */
int restarts;
uint32_t restarts;
/* total number of blocks */
int blocks;
/* total number of index blocks */