summaryrefslogtreecommitdiff
path: root/t/unit-tests/t-reftable-stack.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2025-01-20 17:17:23 +0100
committerJunio C Hamano <gitster@pobox.com>2025-01-21 14:20:29 -0800
commit57adf71b93efa9f9b4db5147e9fa1235f0a1d5ba (patch)
treef5f444b3377c89ae87fdf3c4b444b98e1e281a01 /t/unit-tests/t-reftable-stack.c
parent5ac65f0d6b867ff031fda03779c2f2613f022b10 (diff)
reftable/basics: adjust `hash_size()` to return `uint32_t`
The `hash_size()` function returns the number of bytes used by the hash function. Weirdly enough though, it returns a signed integer for its size even though the size obviously cannot ever be negative. The only case where it could be negative is if the function returned an error when asked for an unknown hash, but we assert(3p) instead. Adjust the type of `hash_size()` to be `uint32_t` and adapt all places that use signed integers for the hash size to follow suit. This also allows us to get rid of a couple asserts that we had which verified that the size was indeed positive, which further stresses the point that this refactoring makes sense. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/unit-tests/t-reftable-stack.c')
0 files changed, 0 insertions, 0 deletions