From 48c193e1831c96247a8f6c7089690f8a71a23035 Mon Sep 17 00:00:00 2001 From: Robert Watson Date: Sun, 17 Dec 2000 18:43:28 +0000 Subject: [PATCH] o Fix up includes which built due to excessive nested including in the base system, but not in BruceBSD. o Fix up style violations of various sorts. o Remove redundant normalization of hertz variable, as the sysctl handler does this work (unlike when kread was used). Submitted by: bde --- usr.bin/systat/main.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/usr.bin/systat/main.c b/usr.bin/systat/main.c index f524dcacb87..52bb1e57967 100644 --- a/usr.bin/systat/main.c +++ b/usr.bin/systat/main.c @@ -46,6 +46,7 @@ static const char rcsid[] = #endif /* not lint */ #include +#include #include #include @@ -66,7 +67,7 @@ double avenrun[3]; int col; int naptime = 5; int verbose = 1; /* to report kvm read errs */ -struct clockinfo clkinfo; +struct clockinfo clkinfo; double hertz; char c; char *namp; @@ -81,7 +82,7 @@ main(argc, argv) int argc; char **argv; { - char errbuf[80]; + char errbuf[80]; size_t size; int err; @@ -133,15 +134,13 @@ main(argc, argv) die(0); } gethostname(hostname, sizeof (hostname)); - size = sizeof(clkinfo); err = sysctlbyname("kern.clockrate", &clkinfo, &size, NULL, 0); if (err != 0 || size != sizeof(clkinfo)) { - perror("kern.clockrate"); + error("kern.clockrate"); die(0); } - - hertz = clkinfo.stathz ? clkinfo.stathz : clkinfo.hz; + hertz = clkinfo.stathz; (*curcmd->c_init)(); curcmd->c_flags |= CF_INIT; labels();