diff options
author | Jason Wright <jason@cvs.openbsd.org> | 2003-02-28 21:29:08 +0000 |
---|---|---|
committer | Jason Wright <jason@cvs.openbsd.org> | 2003-02-28 21:29:08 +0000 |
commit | 5fc4aabcb7adb9f64513ecc91087a78166cda41d (patch) | |
tree | cc10f245e50b6a510537448faf00471f4dd4406d /usr.bin/systat | |
parent | 4aff5d0c7cfa934f7b4eacdd1c199ce2dac3db8d (diff) |
intrcnt's are ints not longs (at least according to the new kern.intrcnt stuff)
Diffstat (limited to 'usr.bin/systat')
-rw-r--r-- | usr.bin/systat/vmstat.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/usr.bin/systat/vmstat.c b/usr.bin/systat/vmstat.c index f2036fb154f..08c1b219870 100644 --- a/usr.bin/systat/vmstat.c +++ b/usr.bin/systat/vmstat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vmstat.c,v 1.37 2002/12/16 01:57:04 tdeval Exp $ */ +/* $OpenBSD: vmstat.c,v 1.38 2003/02/28 21:29:07 jason Exp $ */ /* $NetBSD: vmstat.c,v 1.5 1996/05/10 23:16:40 thorpej Exp $ */ /*- @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)vmstat.c 8.2 (Berkeley) 1/12/94"; #endif -static char rcsid[] = "$OpenBSD: vmstat.c,v 1.37 2002/12/16 01:57:04 tdeval Exp $"; +static char rcsid[] = "$OpenBSD: vmstat.c,v 1.38 2003/02/28 21:29:07 jason Exp $"; #endif /* not lint */ /* @@ -82,7 +82,7 @@ static struct Info { struct vmtotal Total; struct nchstats nchstats; long nchcount; - long *intrcnt; + int *intrcnt; } s, s1, s2, z; #include "dkstats.h" @@ -233,7 +233,7 @@ initkre(void) } #else nintr = (namelist[X_EINTRCNT].n_value - - namelist[X_INTRCNT].n_value) / sizeof (long); + namelist[X_INTRCNT].n_value) / sizeof (int); intrloc = calloc(nintr, sizeof (long)); intrname = calloc(nintr, sizeof (long)); intrnamebuf = malloc(namelist[X_EINTRNAMES].n_value - @@ -648,7 +648,7 @@ getinfo(struct Info *s, enum state st) } } #else - NREAD(X_INTRCNT, s->intrcnt, nintr * sizeof(long)); + NREAD(X_INTRCNT, s->intrcnt, nintr * sizeof(int)); #endif size = sizeof(s->time); if (sysctl(cp_time_mib, 2, &s->time, &size, NULL, 0) < 0) { @@ -679,7 +679,7 @@ static void allocinfo(struct Info *s) { - s->intrcnt = (long *) malloc(nintr * sizeof(long)); + s->intrcnt = (int *) malloc(nintr * sizeof(int)); if (s->intrcnt == NULL) errx(2, "out of memory"); } @@ -687,7 +687,7 @@ allocinfo(struct Info *s) static void copyinfo(struct Info *from, struct Info *to) { - long *intrcnt; + int *intrcnt; intrcnt = to->intrcnt; *to = *from; |