Re: [PATCH v2 15/17] midx: use 64-bit multiplication for chunk sizes
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 5, 2021, 20:41 UTC
- Message-ID
- <xmqqwnvmz1pv.fsf@gitster.c.googlers.com>
- In-Reply-To
- <CAPx1GvcNTkXo-6rdaRc4YNGAq8AoCtwT86AEUT+A6c22erVW0g@mail.gmail.com>
Chris Torek <chris.torek@gmail.com> writes:
Show 7 quoted lines
> On Thu, Feb 4, 2021 at 4:00 PM Junio C Hamano <gitster@pobox.com> wrote: >> * the fourth parameter of add_chunk() is of size_t, not uint64_t; >> shouldn't the multiplication be done in type size_t instead? > > There are (still) systems with 32-bit size_t (but 64-bit > off_t / file sizes), so ... probably not. Is size_t ever more than > 64 bits these days?
Sorry, you lost me. I do not see how it would help to perform the multiplication in uint64_t, when you suspect that size_t is too small, if the final destination of the result of the multiplication is a function argument of type size_t?