summaryrefslogtreecommitdiff
path: root/usr.bin/systat
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2006-11-13 19:03:52 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2006-11-13 19:03:52 +0000
commit5dfdad8c9a03b5917a916a713c679847e5ca3fbb (patch)
treeee88392a3095041aabb2e458274bcebe7d854948 /usr.bin/systat
parentdf283aeafa14d969460472b6bab235febb2a6965 (diff)
fix macro abuse leading to stray numbers in the vm display.
ok a whole lot of devs@
Diffstat (limited to 'usr.bin/systat')
-rw-r--r--usr.bin/systat/vmstat.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/usr.bin/systat/vmstat.c b/usr.bin/systat/vmstat.c
index 8fe15dc7e64..e758f334e3c 100644
--- a/usr.bin/systat/vmstat.c
+++ b/usr.bin/systat/vmstat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmstat.c,v 1.60 2006/04/14 01:14:56 dlg Exp $ */
+/* $OpenBSD: vmstat.c,v 1.61 2006/11/13 19:03:51 otto Exp $ */
/* $NetBSD: vmstat.c,v 1.5 1996/05/10 23:16:40 thorpej Exp $ */
/*-
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)vmstat.c 8.2 (Berkeley) 1/12/94";
#endif
-static char rcsid[] = "$OpenBSD: vmstat.c,v 1.60 2006/04/14 01:14:56 dlg Exp $";
+static char rcsid[] = "$OpenBSD: vmstat.c,v 1.61 2006/11/13 19:03:51 otto Exp $";
#endif /* not lint */
/*
@@ -299,8 +299,10 @@ labelkre(void)
#define Z(fld) {t = s.nchstats.fld; s.nchstats.fld -= s1.nchstats.fld; \
if (state == TIME) s1.nchstats.fld = t;}
#define PUTRATE(fld, l, c, w) \
- Y(fld); \
- putint((int)((float)s.fld/etime + 0.5), l, c, w)
+ do { \
+ Y(fld); \
+ putint((int)((float)s.fld/etime + 0.5), l, c, w); \
+ } while (0)
#define MAXFAIL 5
static char cpuchar[CPUSTATES] = { '|', '=', '>', '-', ' ' };