summaryrefslogtreecommitdiffstats
path: root/usr.bin/systat
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1998-07-06 22:08:00 +0000
committerbde <bde@FreeBSD.org>1998-07-06 22:08:00 +0000
commitcd1f335715f421dbac6b0c93f528c7bf82c724d3 (patch)
tree5a965f5f256f48eb47f46c094a6979c5544d382d /usr.bin/systat
parent067f8c8dc926fe603627b3942b43d82910de2a5f (diff)
downloadFreeBSD-src-cd1f335715f421dbac6b0c93f528c7bf82c724d3.zip
FreeBSD-src-cd1f335715f421dbac6b0c93f528c7bf82c724d3.tar.gz
Fixed type mismatches which were fatal when sizeof(long) > sizeof(int).
Diffstat (limited to 'usr.bin/systat')
-rw-r--r--usr.bin/systat/disks.c2
-rw-r--r--usr.bin/systat/iostat.c2
-rw-r--r--usr.bin/systat/main.c6
-rw-r--r--usr.bin/systat/pigs.c4
-rw-r--r--usr.bin/systat/vmstat.c12
5 files changed, 13 insertions, 13 deletions
diff --git a/usr.bin/systat/disks.c b/usr.bin/systat/disks.c
index 1e97fdb..f3ac91d 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 cc8bacf4..b2bd40d 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 3a97aa3..8d6cdba 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 <sys/param.h>
@@ -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 e14d3eb..8af36c8 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 c699a84..90cff80 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);
OpenPOWER on IntegriCloud