Re: [PATCH 1/4] write_idx_file should use an unsigned nr_objects parameter

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 1, 2011 at 1:28 PM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
> Dan McGee <dpmcgee@xxxxxxxxx> 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?

Hmm. when making this patch, I thought it was required due to the
other ones in this sequence or I was seeing compile errors. Reverting
it seems to prove otherwise, as things compile just fine...

Either way, it should at least be an unsigned parameter of at least
int length, no? The current parameter is signed, so 'unsigned' might
make sense here.

-Dan
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]