]> git.ipfire.org Git - thirdparty/git.git/commit
midx.c: store `nr`, `alloc` variables as `size_t`'s
authorTaylor Blau <me@ttaylorr.com>
Wed, 12 Jul 2023 23:37:44 +0000 (19:37 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 14 Jul 2023 16:32:03 +0000 (09:32 -0700)
commitcc38127439be50ade60fb2db18c7f5f0cc170a36
tree7e9e2b8317129968c3d9af3190812cd317d2a6e8
parent5675150cc3bfc03c5721edcfc49fbe43b15b5209
midx.c: store `nr`, `alloc` variables as `size_t`'s

In the `write_midx_context` structure, we use two `uint32_t`'s to track
the length and allocated size of the packs, and one `uint32_t` to track
the number of objects in the MIDX.

In practice, having these be 32-bit unsigned values shouldn't cause any
problems since we are unlikely to have that many objects or packs in any
real-world repository. But these values should be `size_t`'s, so change
their type to reflect that.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
midx.c