Commit 5b6d8ef6 authored by Thorsten Blum's avatar Thorsten Blum Committed by Daniel Thompson
Browse files

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: default avatarThorsten Blum <thorsten.blum@toblux.com>
Reviewed-by: default avatarDouglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20240328140015.388654-3-thorsten.blum@toblux.com


Signed-off-by: default avatarDaniel Thompson <daniel.thompson@linaro.org>
parent 0bbac3fa
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);