summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_clock.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1996-01-29 07:03:11 +0000
committerderaadt <deraadt@openbsd.org>1996-01-29 07:03:11 +0000
commit08cbb6cebec50567c40c07f0eec1b4f8564da35d (patch)
tree9c08c7e4643fd5932970fb8fbd7cd6674ea11969 /sys/kern/kern_clock.c
parentfrom netbsd (diff)
downloadwireguard-openbsd-08cbb6cebec50567c40c07f0eec1b4f8564da35d.tar.xz
wireguard-openbsd-08cbb6cebec50567c40c07f0eec1b4f8564da35d.zip
from netbsd:
fix off-by-one error in tickfix code. (should increment when count >= interval, because count goes from 0->(interval-1) to count interval ticks.)
Diffstat (limited to 'sys/kern/kern_clock.c')
-rw-r--r--sys/kern/kern_clock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_clock.c b/sys/kern/kern_clock.c
index d45d02a5e8f..86592699658 100644
--- a/sys/kern/kern_clock.c
+++ b/sys/kern/kern_clock.c
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_clock.c,v 1.23 1995/12/28 19:16:41 thorpej Exp $ */
+/* $NetBSD: kern_clock.c,v 1.24 1996/01/17 04:37:31 cgd Exp $ */
/*-
* Copyright (c) 1982, 1986, 1991, 1993
@@ -200,7 +200,7 @@ hardclock(frame)
delta = tick;
if (tickfix) {
tickfixcnt++;
- if (tickfixcnt > tickfixinterval) {
+ if (tickfixcnt >= tickfixinterval) {
delta += tickfix;
tickfixcnt = 0;
}