Re: [PATCH v6 09/11] pack-objects: shrink size field in struct object_entry
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Mar 19, 2018, 16:23 UTC
- Message-ID
- <CACsJy8CFZhUfCuzkKTYg9-_qrz4OtkZD3B3-4_P0B8KTgNR4cQ@mail.gmail.com>
- In-Reply-To
- <xmqqzi34vy01.fsf@gitster-ct.c.googlers.com>
On Mon, Mar 19, 2018 at 5:19 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 17 quoted lines
> Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:
>
>> +static inline int oe_fits_in_32bits(unsigned long limit)
>> +{
>> + uint32_t truncated_limit = (uint32_t)limit;
>> +
>> + return limit == truncated_limit;
>> +}
>
> I do not think it is worth a reroll (there only are a few
> callsites), but the above has nothing to do with "oe" fitting
> anything (it is about "limit"). Do you mind if I did this instead?
>
> static inline int fits_in_32bits(unsigned long size)
>
> ... or other suggestions, perhaps?
>I just tried to not pollute the general namespace too much. That works for me too.
-- Duy