]> git.ipfire.org Git - thirdparty/git.git/commitdiff
reftable/blocksource: adjust type of the block length
authorPatrick Steinhardt <ps@pks.im>
Mon, 20 Jan 2025 16:17:26 +0000 (17:17 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 21 Jan 2025 22:20:30 +0000 (14:20 -0800)
The block length is used to track the number of bytes available in a
specific block. As such, it is never set to a negative value, but is
still represented by a signed integer.

Adjust the type of the variable to be `size_t`.

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

index 5aa3990a5732f69d65ddecb222238b1d5a6a618f..f06ad52e0a2f34f1d46ea52163d899a0dad09851 100644 (file)
@@ -22,7 +22,7 @@ struct reftable_block_source {
  * so it can return itself into the pool. */
 struct reftable_block {
        uint8_t *data;
-       int len;
+       size_t len;
        struct reftable_block_source source;
 };