diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-12-04 10:04:45 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-12-04 10:04:45 +0000 |
commit | 328671480a07e808e3e538fd6115e711f0ecd2d2 (patch) | |
tree | 1bfc617b6d13b1fc51e9e063d6647ab8ec8c81a3 | |
parent | 9bad623cb8680397899edd42683cedeba1a9501c (diff) |
roundup error; netbsd pr#2944, augustss@cs.chalmers.se
-rw-r--r-- | usr.bin/vmstat/vmstat.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/vmstat/vmstat.c b/usr.bin/vmstat/vmstat.c index 4fb56feb283..c90f47a17a7 100644 --- a/usr.bin/vmstat/vmstat.c +++ b/usr.bin/vmstat/vmstat.c @@ -1,5 +1,5 @@ /* $NetBSD: vmstat.c,v 1.29.4.1 1996/06/05 00:21:05 cgd Exp $ */ -/* $OpenBSD: vmstat.c,v 1.13 1996/06/24 23:51:59 tholo Exp $ */ +/* $OpenBSD: vmstat.c,v 1.14 1996/12/04 10:04:44 deraadt Exp $ */ /* * Copyright (c) 1980, 1986, 1991, 1993 @@ -437,7 +437,7 @@ dovmstat(interval, reps) * We round upward to avoid losing low-frequency events * (i.e., >= 1 per interval but < 1 per second). */ - halfuptime = (uptime + 1) / 2; + halfuptime = uptime == 1 ? 0 : (uptime + 1) / 2; (void)sleep(interval); } } |