diff --git a/usr.bin/systat/disks.c b/usr.bin/systat/disks.c index 1e97fdbefda4..f3ac91d413b7 100644 --- a/usr.bin/systat/disks.c +++ b/usr.bin/systat/disks.c @@ -110,7 +110,7 @@ dkinit() error("dk_ndrive undefined in kernel"); return(0); } - NREAD(X_DK_NDRIVE, &dk_ndrive, LONG); + NREAD(X_DK_NDRIVE, &dk_ndrive, sizeof(dk_ndrive)); if (dk_ndrive <= 0) { error("dk_ndrive=%d according to %s", dk_ndrive, getbootfile()); return(0); diff --git a/usr.bin/systat/iostat.c b/usr.bin/systat/iostat.c index cc8bacf439e4..b2bd40d511f0 100644 --- a/usr.bin/systat/iostat.c +++ b/usr.bin/systat/iostat.c @@ -143,7 +143,7 @@ fetchiostat() { if (namelist[X_DK_BUSY].n_type == 0) return; - NREAD(X_DK_BUSY, &s.dk_busy, LONG); + NREAD(X_DK_BUSY, &s.dk_busy, sizeof(s.dk_busy)); NREAD(X_DK_TIME, s.dk_time, dk_ndrive * LONG); NREAD(X_DK_XFER, s.dk_xfer, dk_ndrive * LONG); NREAD(X_DK_WDS, s.dk_wds, dk_ndrive * LONG); diff --git a/usr.bin/systat/main.c b/usr.bin/systat/main.c index 3a97aa379136..8d6cdbafd828 100644 --- a/usr.bin/systat/main.c +++ b/usr.bin/systat/main.c @@ -42,7 +42,7 @@ static char copyright[] = static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/6/93"; #endif static const char rcsid[] = - "$Id: main.c,v 1.7 1997/08/26 10:59:26 charnier Exp $"; + "$Id: main.c,v 1.8 1998/06/09 04:17:19 imp Exp $"; #endif /* not lint */ #include @@ -142,8 +142,8 @@ main(argc, argv) if (namelist[X_FIRST].n_type == 0) errx(1, "couldn't read namelist"); gethostname(hostname, sizeof (hostname)); - NREAD(X_HZ, &hz, LONG); - NREAD(X_STATHZ, &stathz, LONG); + NREAD(X_HZ, &hz, sizeof(hz)); + NREAD(X_STATHZ, &stathz, sizeof(stathz)); hertz = stathz ? stathz : hz; (*curcmd->c_init)(); curcmd->c_flags |= CF_INIT; diff --git a/usr.bin/systat/pigs.c b/usr.bin/systat/pigs.c index e14d3ebece72..8af36c84ad74 100644 --- a/usr.bin/systat/pigs.c +++ b/usr.bin/systat/pigs.c @@ -64,7 +64,7 @@ static struct p_times { } *pt; static long stime[CPUSTATES]; -static int fscale; +static long fscale; static double lccpu; WINDOW * @@ -162,7 +162,7 @@ initpigs() } } KREAD(NPTR(X_CPTIME), stime, sizeof (stime)); - NREAD(X_CCPU, &ccpu, LONG); + NREAD(X_CCPU, &ccpu, sizeof(ccpu)); NREAD(X_FSCALE, &fscale, LONG); lccpu = log((double) ccpu / fscale); diff --git a/usr.bin/systat/vmstat.c b/usr.bin/systat/vmstat.c index c699a84976f1..90cff801b2a1 100644 --- a/usr.bin/systat/vmstat.c +++ b/usr.bin/systat/vmstat.c @@ -36,7 +36,7 @@ static char sccsid[] = "@(#)vmstat.c 8.2 (Berkeley) 1/12/94"; #endif static const char rcsid[] = - "$Id: vmstat.c,v 1.24 1998/05/27 21:01:37 jhay Exp $"; + "$Id: vmstat.c,v 1.25 1998/06/09 04:17:29 imp Exp $"; #endif /* not lint */ /* @@ -83,8 +83,8 @@ static struct Info { long *intrcnt; int bufspace; int desiredvnodes; - int numvnodes; - int freevnodes; + long numvnodes; + long freevnodes; } s, s1, s2, z; #define cnt s.Cnt @@ -626,11 +626,11 @@ getinfo(s, st) NREAD(X_CPTIME, s->time, sizeof s->time); NREAD(X_CNT, &s->Cnt, sizeof s->Cnt); - NREAD(X_BUFFERSPACE, &s->bufspace, LONG); - NREAD(X_DESIREDVNODES, &s->desiredvnodes, LONG); + NREAD(X_BUFFERSPACE, &s->bufspace, sizeof(s->bufspace)); + NREAD(X_DESIREDVNODES, &s->desiredvnodes, sizeof(s->desiredvnodes)); NREAD(X_NUMVNODES, &s->numvnodes, LONG); NREAD(X_FREEVNODES, &s->freevnodes, LONG); - NREAD(X_DK_BUSY, &s->dk_busy, LONG); + NREAD(X_DK_BUSY, &s->dk_busy, sizeof(s->dk_busy)); NREAD(X_DK_TIME, s->dk_time, dk_ndrive * LONG); NREAD(X_DK_XFER, s->dk_xfer, dk_ndrive * LONG); NREAD(X_DK_WDS, s->dk_wds, dk_ndrive * LONG);