summaryrefslogtreecommitdiffstats
path: root/usr.bin/vmstat/vmstat.c
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2013-08-22 04:43:40 +0000
committerguenther <guenther@openbsd.org>2013-08-22 04:43:40 +0000
commit82ff36301fdb8c25511dd105cf211d26ea7f836e (patch)
treef17f8c8d35e761468f7997cee38d8a28bf837c8b /usr.bin/vmstat/vmstat.c
parentSplit out from kdump.c the ktrstruct.c bits into ktrstruct.c (diff)
downloadwireguard-openbsd-82ff36301fdb8c25511dd105cf211d26ea7f836e.tar.xz
wireguard-openbsd-82ff36301fdb8c25511dd105cf211d26ea7f836e.zip
Correct format string mismatches turned up by -Wformat=2
suggestions and ok millert@
Diffstat (limited to 'usr.bin/vmstat/vmstat.c')
-rw-r--r--usr.bin/vmstat/vmstat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/vmstat/vmstat.c b/usr.bin/vmstat/vmstat.c
index 34bd31a071c..cbfd655a71f 100644
--- a/usr.bin/vmstat/vmstat.c
+++ b/usr.bin/vmstat/vmstat.c
@@ -1,5 +1,5 @@
/* $NetBSD: vmstat.c,v 1.29.4.1 1996/06/05 00:21:05 cgd Exp $ */
-/* $OpenBSD: vmstat.c,v 1.122 2013/07/18 08:42:50 bluhm Exp $ */
+/* $OpenBSD: vmstat.c,v 1.123 2013/08/22 04:43:40 guenther Exp $ */
/*
* Copyright (c) 1980, 1986, 1991, 1993
@@ -368,7 +368,7 @@ dovmstat(u_int interval, int reps)
}
(void)printf(" %u %u %u ",
total.t_rq - 1, total.t_dw + total.t_pw, total.t_sw);
-#define rate(x) ((((unsigned)x) + halfuptime) / uptime) /* round */
+#define rate(x) ((unsigned)((((unsigned)x) + halfuptime) / uptime)) /* round */
#define pgtok(a) ((a) * ((unsigned int)uvmexp.pagesize >> 10))
(void)printf("%6u %7u ",
pgtok(total.t_avm), pgtok(total.t_free));