[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <9AAAD718-D1D7-416E-87A9-3CA2BA20C93B@toblux.com>
Date: Mon, 8 Apr 2024 12:04:36 +0200
From: Thorsten Blum <thorsten.blum@...lux.com>
To: Damien Le Moal <dlemoal@...nel.org>
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 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
1 file (every number but 1 is plural in English)
2 files
..
Best,
Thorsten
Powered by blists - more mailing lists