lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aeb7dd59-4b11-4b16-b3dd-6b481768d575@kernel.org>
Date: Mon, 8 Apr 2024 19:06:32 +0900
From: Damien Le Moal <dlemoal@...nel.org>
To: Thorsten Blum <thorsten.blum@...lux.com>
Cc: Naohiro Aota <naohiro.aota@....com>, Johannes Thumshirn <jth@...nel.org>,
 linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] zonefs: Use str_plural() to fix Coccinelle warning

On 4/8/24 19:04, Thorsten Blum wrote:
> On 8. Apr 2024, at 03:48, Damien Le Moal <dlemoal@...nel.org> 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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ