diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2002-04-29 17:28:13 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2002-04-29 17:28:13 +0000 |
commit | ea398ade476b9d0c4c27aeecd4e2ba97753c074f (patch) | |
tree | f7824f62b279947cf0b4054aca7a2177b3846df6 /usr.bin | |
parent | 28c7d756ba0ecf82036c0db5ef23dee7d330a631 (diff) |
Fix 32bit int oflow when there is > 2GB vm; peters AT telia DOT net
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/systat/vmstat.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/systat/vmstat.c b/usr.bin/systat/vmstat.c index feb7d2a625f..320a1439af4 100644 --- a/usr.bin/systat/vmstat.c +++ b/usr.bin/systat/vmstat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vmstat.c,v 1.33 2002/02/16 21:27:54 millert Exp $ */ +/* $OpenBSD: vmstat.c,v 1.34 2002/04/29 17:28:12 millert 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.33 2002/02/16 21:27:54 millert Exp $"; +static char rcsid[] = "$OpenBSD: vmstat.c,v 1.34 2002/04/29 17:28:12 millert Exp $"; #endif /* not lint */ /* @@ -453,7 +453,7 @@ showkre() putfloat(avenrun[1], STATROW, STATCOL + 23, 6, 2, 0); putfloat(avenrun[2], STATROW, STATCOL + 29, 6, 2, 0); mvaddstr(STATROW, STATCOL + 53, buf); -#define pgtokb(pg) ((pg) * s.uvmexp.pagesize / 1024) +#define pgtokb(pg) ((pg) * (s.uvmexp.pagesize / 1024)) putint(pgtokb(s.uvmexp.active), MEMROW + 2, MEMCOL + 6, 7); putint(pgtokb(s.uvmexp.active + s.uvmexp.swpginuse), /* XXX */ |