aboutsummaryrefslogtreecommitdiff
path: root/sys/i386
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2009-06-23 23:16:37 +0000
committerAlexander Motin <mav@FreeBSD.org>2009-06-23 23:16:37 +0000
commit9f23a6caa4f90ac3347968748f071a47b2e6820d (patch)
tree9da94a27196fed38391256691b4c9022c6b037b8 /sys/i386
parent1946089b52e6041fcc7d60aa8ecbad332865a3e1 (diff)
Make algorithm a bit more bulletproof.
Notes
Notes: svn path=/head/; revision=194790
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/isa/clock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/i386/isa/clock.c b/sys/i386/isa/clock.c
index 5e74796eb593..12e76e4b7ea9 100644
--- a/sys/i386/isa/clock.c
+++ b/sys/i386/isa/clock.c
@@ -195,7 +195,7 @@ clkintr(struct trapframe *frame)
#endif
hardclockintr(frame);
} else {
- if (--pscnt == 0) {
+ if (--pscnt <= 0) {
pscnt = psratio;
#ifdef SMP
if (smp_started)
@@ -293,7 +293,7 @@ rtcintr(struct trapframe *frame)
while (rtcin(RTC_INTR) & RTCIR_PERIOD) {
flag = 1;
- if (--pscnt == 0) {
+ if (--pscnt <= 0) {
pscnt = psdiv;
#ifdef SMP
if (smp_started)