summaryrefslogtreecommitdiff
path: root/usr.bin/systat/main.c
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/main.c
parent43d00340767962573e8f4418536d673eef26b8a9 (diff)
compile on older gcc; no decl after code
Diffstat (limited to 'usr.bin/systat/main.c')
-rw-r--r--usr.bin/systat/main.c13
1 files changed, 5 insertions, 8 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);