[PATCH 08/10] reftable/blocksource: adjust type of the block length
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Jan 16, 2025, 10:08 UTC
- Message-ID
- <20250116-b4-pks-reftable-sign-compare-v1-8-bd30e2ee96e7@pks.im>
- In-Reply-To
- <20250116-b4-pks-reftable-sign-compare-v1-0-bd30e2ee96e7@pks.im>
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> --- reftable/reftable-blocksource.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/reftable/reftable-blocksource.h b/reftable/reftable-blocksource.h index 5aa3990a57..f06ad52e0a 100644 --- a/reftable/reftable-blocksource.h +++ b/reftable/reftable-blocksource.h @@ -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; };
-- 2.48.0.257.gd3603152ad.dirty