1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-18 02:19:39 +00:00

Fix xo_emit format string for percentages

The "%lld" format string was used with a value of type long.
See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=278532.

Reviewed by: imp, mmel
Pull Request: https://github.com/freebsd/freebsd-src/pull/1344
This commit is contained in:
John F. Carr 2024-04-22 15:13:44 -04:00 committed by Warner Losh
parent d00827a9ca
commit 00b0498051

View File

@ -1105,7 +1105,7 @@ percent(const char *name, long pctv, int *over)
{
char fmt[64];
snprintf(fmt, sizeof(fmt), " {:%s/%%%ulld/%%lld}", name,
snprintf(fmt, sizeof(fmt), " {:%s/%%%uld/%%ld}", name,
(*over && pctv <= 9) ? 1 : 2);
xo_emit(fmt, pctv);
if (*over && pctv <= 9)