Re: [PATCH v2 07/11] reftable: use `uint16_t` to track restart interval

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

 



On Mon, May 13, 2024 at 03:42:37PM -0700, Junio C Hamano wrote:
> Patrick Steinhardt <ps@xxxxxx> writes:
> 
> > The restart interval can at most be `UINT16_MAX` as specified in the
> > technical documentation of the reftable format. Furthermore, it cannot
> > ever be negative. Regardless of that we use an `int` to track the
> > restart interval.
> >
> > Change the type to use an `uint16_t` instead.
> 
> Not wrong per-se, but this one is more or less a Meh, as we know we
> do not work on 16-bit platforms anyway.

Yeah, my intent isn't really "platform portability". It's rather that I
think that an `uint16_t` documents the accepted range of values much
better than `int` does.

Patrick

Attachment: signature.asc
Description: PGP signature


[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]

  Powered by Linux