]> git.ipfire.org Git - thirdparty/git.git/commit
reftable/block: use `size_t` to track restart point index
authorPatrick Steinhardt <ps@pks.im>
Mon, 13 May 2024 08:47:01 +0000 (10:47 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 14 May 2024 00:04:16 +0000 (17:04 -0700)
commitd537ce6b9ed75d50c6b8ad071439b06c1b70c5f8
tree86eaf8f220304d474df3ead1403ebc0703927ff5
parent0f3415f1f8478b05e64db11eb8aaa2915e48fef6
reftable/block: use `size_t` to track restart point index

The function `block_reader_restart_offset()` gets the offset of the
`i`th restart point. `i` is a signed integer though, which is certainly
not the correct type to track indices like this. Furthermore, both
callers end up passing a `size_t`.

Refactor the code to use a `size_t` instead.

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