Re: [PATCH v2 0/2] string-list.h: make "nr" and "alloc" a "size_t"

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

 



On 3/7/2022 10:27 AM, Ævar Arnfjörð Bjarmason wrote:
> Change the "struct string_list" to have a "size_t" for "nr" and
> "alloc", ensuring we won't overflow on platforms where size_t is 64
> bit, but "unsigned int" is 32 bit.
> 
> This replaces the v1 1/2 to get rid of the casts we use for Q_(), and
> the 2/2's addition of casts is then consistent with those.

This version looks a lot better, localizing the need for understanding
cast implications into the implementation of Q_() instead of every
caller.

Thanks,
-Stolee



[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