Re: [PATCH 1/4] write_idx_file should use an unsigned nr_objects parameter
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 1, 2011, 18:28 UTC
- Message-ID
- <7vtyehg71w.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <1301534674-31981-1-git-send-email-dpmcgee@gmail.com>
Dan McGee <dpmcgee@gmail.com> writes:
> This follows the precedent set in the pack-objects code and being > adjusted for in index-pack and unpack-objects.
Eh, why? The use of a fixed-width type in the existing code is mostly to make sure that the on-disk result will fit within the on-disk field. The variables like iteration counter "i" we use in write_idx_file() need to be at least as wide but there is no reason to forbid the compiler from using the natural interger type as long as it is more suiable on the platform, no?