Re: [PATCH] zonefs: Use str_plural() to fix Coccinelle warning

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

 



On 4/8/24 19:04, Thorsten Blum wrote:
> On 8. Apr 2024, at 03:48, Damien Le Moal <dlemoal@xxxxxxxxxx> wrote:
>>
>> Looking at this function definition:
>>
>> static inline const char *str_plural(size_t num)
>> {
>> return num == 1 ? "" : "s";
>> }
>>
>> It is wrong: num == 0 should not imply plural. This function needs to be fixed.
> 
> I think the function is correct because in English it's:
> 
> 0 files

Hu... I learned something today :)
OK. Will queue that the patch then !

> 1 file (every number but 1 is plural in English)
> 2 files
> ...
> 
> Best,
> Thorsten

-- 
Damien Le Moal
Western Digital Research





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux