mirror of
https://github.com/git/git.git
synced 2024-11-23 18:05:29 +08:00
reftable: use uint16_t
to track restart interval
The restart interval can at most be `UINT16_MAX` as specified in the technical documentation of the reftable format. Furthermore, it cannot ever be negative. Regardless of that we use an `int` to track the restart interval. Change the type to use an `uint16_t` instead. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
831b366c24
commit
8e9e136d61
@ -29,7 +29,7 @@ struct block_writer {
|
||||
uint32_t header_off;
|
||||
|
||||
/* How often to restart keys. */
|
||||
int restart_interval;
|
||||
uint16_t restart_interval;
|
||||
int hash_size;
|
||||
|
||||
/* Offset of next uint8_t to write. */
|
||||
|
@ -28,7 +28,7 @@ struct reftable_write_options {
|
||||
unsigned skip_index_objects : 1;
|
||||
|
||||
/* how often to write complete keys in each block. */
|
||||
int restart_interval;
|
||||
uint16_t restart_interval;
|
||||
|
||||
/* 4-byte identifier ("sha1", "s256") of the hash.
|
||||
* Defaults to SHA1 if unset
|
||||
|
Loading…
Reference in New Issue
Block a user