Skip to content

Commit

Permalink
Fix xo_emit format string for percentages
Browse files Browse the repository at this point in the history
The "%lld" format string was used with a value of type long.
See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=278532.
  • Loading branch information
VoxSciurorum committed Jul 24, 2024
1 parent bb7f7d5 commit 9eccbb7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion usr.bin/vmstat/vmstat.c
Original file line number Diff line number Diff line change
Expand Up @@ -1103,7 +1103,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)

Check warning on line 1109 in usr.bin/vmstat/vmstat.c

View workflow job for this annotation

GitHub Actions / Style Checker

Missing Signed-off-by: line
Expand Down

0 comments on commit 9eccbb7

Please sign in to comment.