summaryrefslogtreecommitdiff
path: root/sys/kern/kern_clock.c
diff options
context:
space:
mode:
authorThorsten Lockert <tholo@cvs.openbsd.org>1998-02-08 22:41:53 +0000
committerThorsten Lockert <tholo@cvs.openbsd.org>1998-02-08 22:41:53 +0000
commit7be79d1dabf4aa2c866b352e2a4ab286a403e5d6 (patch)
treed445472670515452a4a239cef652c9f1b617f841 /sys/kern/kern_clock.c
parent5f824803e29da9efcd793a89ec59fe8a8297a269 (diff)
Updates to match type changes in syscall tables
Diffstat (limited to 'sys/kern/kern_clock.c')
-rw-r--r--sys/kern/kern_clock.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/kern/kern_clock.c b/sys/kern/kern_clock.c
index b4e4d5f7d7b..a320ed66805 100644
--- a/sys/kern/kern_clock.c
+++ b/sys/kern/kern_clock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_clock.c,v 1.17 1997/12/30 19:07:29 mickey Exp $ */
+/* $OpenBSD: kern_clock.c,v 1.18 1998/02/08 22:41:34 tholo Exp $ */
/* $NetBSD: kern_clock.c,v 1.34 1996/06/09 04:51:03 briggs Exp $ */
/*-
@@ -584,7 +584,8 @@ hardclock(frame)
*/
#ifdef PPS_SYNC
pps_valid++;
- if (pps_valid == PPS_VALID) {
+ if (pps_valid >= PPS_VALID) {
+ pps_valid = PPS_VALID; /* Avoid possible overflow */
pps_jitter = MAXTIME;
pps_stabil = MAXFREQ;
time_status &= ~(STA_PPSSIGNAL | STA_PPSJITTER |
@@ -1019,7 +1020,7 @@ hardupdate(offset)
return;
ltemp = offset;
#ifdef PPS_SYNC
- if (time_status & STA_PPSTIME && time_status & STA_PPSSIGNAL)
+ if ((time_status & STA_PPSTIME) && (time_status & STA_PPSSIGNAL))
ltemp = pps_offset;
#endif /* PPS_SYNC */