kdb: Use str_plural() to fix Coccinelle warning
Fixes the following Coccinelle/coccicheck warning reported by string_choices.cocci: opportunity for str_plural(days) Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com> Reviewed-by: Douglas Anderson <dianders@chromium.org> Link: https://lore.kernel.org/r/20240328140015.388654-3-thorsten.blum@toblux.com Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
This commit is contained in:
parent
0bbac3facb
commit
5b6d8ef6f0
@ -2517,7 +2517,7 @@ static int kdb_summary(int argc, const char **argv)
|
||||
if (val.uptime > (24*60*60)) {
|
||||
int days = val.uptime / (24*60*60);
|
||||
val.uptime %= (24*60*60);
|
||||
kdb_printf("%d day%s ", days, days == 1 ? "" : "s");
|
||||
kdb_printf("%d day%s ", days, str_plural(days));
|
||||
}
|
||||
kdb_printf("%02ld:%02ld\n", val.uptime/(60*60), (val.uptime/60)%60);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user