summaryrefslogtreecommitdiff
path: root/usr.bin/systat
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2008-06-13 10:06:15 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2008-06-13 10:06:15 +0000
commitf1e1220e3fd00c154ba519b596c16d734475bb87 (patch)
treed01617d14f49b0ff6c974e898f98f484b1387a1a /usr.bin/systat
parent43d00340767962573e8f4418536d673eef26b8a9 (diff)
compile on older gcc; no decl after code
Diffstat (limited to 'usr.bin/systat')
-rw-r--r--usr.bin/systat/main.c13
-rw-r--r--usr.bin/systat/vmstat.c7
2 files changed, 8 insertions, 12 deletions
diff --git a/usr.bin/systat/main.c b/usr.bin/systat/main.c
index fa96d97d1be..537411e4a66 100644
--- a/usr.bin/systat/main.c
+++ b/usr.bin/systat/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.39 2008/06/13 01:24:55 canacar Exp $ */
+/* $Id: main.c,v 1.40 2008/06/13 10:06:14 deraadt Exp $ */
/*
* Copyright (c) 2001, 2007 Can Erkin Acar
* Copyright (c) 2001 Daniel Hartmeier
@@ -86,11 +86,11 @@ int
print_header(void)
{
struct tm *tp;
- time_t t;
+ time_t t, now;
order_type *ordering;
-
- int start = dispstart + 1;
- int end = dispstart + maxprint;
+ int start = dispstart + 1, end = dispstart + maxprint;
+ extern int ucount();
+ char tbuf[26];
if (end > num_disp)
end = num_disp;
@@ -109,9 +109,6 @@ print_header(void)
#endif
getloadavg(avenrun, sizeof(avenrun) / sizeof(avenrun[0]));
- extern int ucount();
- char tbuf[26];
- time_t now;
time(&now);
strlcpy(tbuf, ctime(&now), sizeof tbuf);
diff --git a/usr.bin/systat/vmstat.c b/usr.bin/systat/vmstat.c
index c8e33e69a0c..033b3613ea0 100644
--- a/usr.bin/systat/vmstat.c
+++ b/usr.bin/systat/vmstat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vmstat.c,v 1.64 2008/06/12 22:26:01 canacar Exp $ */
+/* $OpenBSD: vmstat.c,v 1.65 2008/06/13 10:06:14 deraadt 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.64 2008/06/12 22:26:01 canacar Exp $";
+static char rcsid[] = "$OpenBSD: vmstat.c,v 1.65 2008/06/13 10:06:14 deraadt Exp $";
#endif /* not lint */
/*
@@ -170,6 +170,7 @@ int ncpu = 1;
int
initvmstat(void)
{
+ field_view *v;
int mib[4], i;
size_t size;
@@ -219,8 +220,6 @@ initvmstat(void)
getinfo(&s2);
copyinfo(&z, &s1);
- field_view *v;
-
for (v = views_vm; v->name != NULL; v++)
add_view(v);