mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-31 02:21:39 -04:00
accessibility: Use str_plural() to simplify the code
Use the string choice helper function str_plural() to simplify the code. Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Link: https://patch.msgid.link/20260531230804.254962-9-samuel.thibault@ens-lyon.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
5c3949ef38
commit
768ce60dc8
@@ -98,7 +98,7 @@ static void report_char_chartab_status(int reset, int received, int used,
|
||||
if (rejected)
|
||||
snprintf(buf + (len - 1), sizeof(buf) - (len - 1),
|
||||
" with %d reject%s\n",
|
||||
rejected, rejected > 1 ? "s" : "");
|
||||
rejected, str_plural(rejected));
|
||||
pr_info("%s", buf);
|
||||
}
|
||||
}
|
||||
@@ -740,7 +740,7 @@ static void report_msg_status(int reset, int received, int used,
|
||||
if (rejected)
|
||||
snprintf(buf + (len - 1), sizeof(buf) - (len - 1),
|
||||
" with %d reject%s\n",
|
||||
rejected, rejected > 1 ? "s" : "");
|
||||
rejected, str_plural(rejected));
|
||||
pr_info("%s", buf);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user