lkml.org 
[lkml]   [2024]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] zonefs: Use str_plural() to fix Coccinelle warning
From
Date
On 8. Apr 2024, at 03:48, Damien Le Moal <dlemoal@kernel.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
\
 
 \ /
  Last update: 2024-05-27 16:28    [W:0.234 / U:0.696 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site