]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t/helper/test-pack-deltas: widen `do_compress()`'s maxsize local to `size_t`
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Thu, 9 Jul 2026 16:49:38 +0000 (16:49 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 9 Jul 2026 21:55:24 +0000 (14:55 -0700)
Prep for the upcoming `git_deflate_bound()` widening to `size_t`. The
local is only ever the return value of `git_deflate_bound()` and the
`xmalloc()`/`stream.avail_out` sizes derived from it; widening it has no
semantic effect today.

Assisted-by: Opus 4.7
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/helper/test-pack-deltas.c

index 5e0f72684270030576dd40ee1d5eae9dfc8352ed..959705fecaf14462e478d59ee63398313e28df19 100644 (file)
@@ -22,7 +22,7 @@ static unsigned long do_compress(void **pptr, unsigned long size)
 {
        git_zstream stream;
        void *in, *out;
-       unsigned long maxsize;
+       size_t maxsize;
 
        git_deflate_init(&stream, 1);
        maxsize = git_deflate_bound(&stream, size);