summaryrefslogtreecommitdiff
path: root/usr.bin/systat/iostat.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2006-03-31 04:11:00 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2006-03-31 04:11:00 +0000
commit3addb8d9e0d3aa933924aca643062fdfc0be1d61 (patch)
tree1a173fbc248a7ad1e66d843f7104bd5712e0711b /usr.bin/systat/iostat.c
parentee247746171554a209ff4077048269b68455ddd8 (diff)
fairly simple cleanup, lots of testing done
Diffstat (limited to 'usr.bin/systat/iostat.c')
-rw-r--r--usr.bin/systat/iostat.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/usr.bin/systat/iostat.c b/usr.bin/systat/iostat.c
index 92b27a5f310..2d3e69c077a 100644
--- a/usr.bin/systat/iostat.c
+++ b/usr.bin/systat/iostat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: iostat.c,v 1.23 2004/02/15 22:56:12 tedu Exp $ */
+/* $OpenBSD: iostat.c,v 1.24 2006/03/31 04:10:59 deraadt Exp $ */
/* $NetBSD: iostat.c,v 1.5 1996/05/10 23:16:35 thorpej Exp $ */
/*
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)iostat.c 8.1 (Berkeley) 6/6/93";
#endif
-static char rcsid[] = "$OpenBSD: iostat.c,v 1.23 2004/02/15 22:56:12 tedu Exp $";
+static char rcsid[] = "$OpenBSD: iostat.c,v 1.24 2006/03/31 04:10:59 deraadt Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -308,16 +308,16 @@ static void
stat1(int row, int o)
{
int i;
- double time;
+ double tim;
- time = 0;
+ tim = 0;
for (i = 0; i < CPUSTATES; i++)
- time += cur.cp_time[i];
- if (time == 0.0)
- time = 1.0;
+ tim += cur.cp_time[i];
+ if (tim == 0.0)
+ tim = 1.0;
wmove(wnd, row, INSET);
#define CPUSCALE 0.5
- histogram(100.0 * cur.cp_time[o] / time, 50, CPUSCALE);
+ histogram(100.0 * cur.cp_time[o] / tim, 50, CPUSCALE);
}
static void