reftable/block: adapt header and footer size to return a size_t

The functions `header_size()` and `footer_size()` return a positive
integer representing the size of the header and footer, respectively,
dependent on the version of the reftable format. Similar to the
preceding commit, these functions return a signed integer though, which
is nonsensical given that there is no way for these functions to return
negative.

Adapt the functions to return a `size_t` instead to fix a couple of sign
comparison warnings.

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:24 +01:00
committed by Junio C Hamano
parent 57adf71b93
commit ffe6643668
3 changed files with 5 additions and 5 deletions

View File

@ -15,7 +15,7 @@ https://developers.google.com/open-source/licenses/bsd
#include "system.h"
#include <zlib.h>
int header_size(int version)
size_t header_size(int version)
{
switch (version) {
case 1:
@ -26,7 +26,7 @@ int header_size(int version)
abort();
}
int footer_size(int version)
size_t footer_size(int version)
{
switch (version) {
case 1: