1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-05 09:14:03 +00:00

Fixed bug in hardclock() that caused adjtime() to fail when given

a negative offset.  This would be seen in xntpd as a rash of
``Previous time adjustment didn't complete'' messages on startup.
This commit is contained in:
Garrett Wollman 1994-09-29 00:52:06 +00:00
parent af27b9fc77
commit 93e010b0fd
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=3183
3 changed files with 12 additions and 27 deletions

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)kern_clock.c 8.5 (Berkeley) 1/21/94
* $Id: kern_clock.c,v 1.6 1994/09/18 20:39:46 wollman Exp $
* $Id: kern_clock.c,v 1.7 1994/09/25 19:33:34 phk Exp $
*/
/* Portions of this software are covered by the following: */
@ -467,15 +467,10 @@ hardclock(frame)
long ltemp;
if (timedelta == 0) {
time_update = tick;
time_update = tick;
} else {
if (timedelta < 0) {
time_update = tick - tickdelta;
timedelta += tickdelta;
} else {
time_update = tick + tickdelta;
timedelta -= tickdelta;
}
time_update = tick + tickdelta;
timedelta -= tickdelta;
}
BUMPTIME(&mono_time, time_update);

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)kern_clock.c 8.5 (Berkeley) 1/21/94
* $Id: kern_clock.c,v 1.6 1994/09/18 20:39:46 wollman Exp $
* $Id: kern_clock.c,v 1.7 1994/09/25 19:33:34 phk Exp $
*/
/* Portions of this software are covered by the following: */
@ -467,15 +467,10 @@ hardclock(frame)
long ltemp;
if (timedelta == 0) {
time_update = tick;
time_update = tick;
} else {
if (timedelta < 0) {
time_update = tick - tickdelta;
timedelta += tickdelta;
} else {
time_update = tick + tickdelta;
timedelta -= tickdelta;
}
time_update = tick + tickdelta;
timedelta -= tickdelta;
}
BUMPTIME(&mono_time, time_update);

View File

@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)kern_clock.c 8.5 (Berkeley) 1/21/94
* $Id: kern_clock.c,v 1.6 1994/09/18 20:39:46 wollman Exp $
* $Id: kern_clock.c,v 1.7 1994/09/25 19:33:34 phk Exp $
*/
/* Portions of this software are covered by the following: */
@ -467,15 +467,10 @@ hardclock(frame)
long ltemp;
if (timedelta == 0) {
time_update = tick;
time_update = tick;
} else {
if (timedelta < 0) {
time_update = tick - tickdelta;
timedelta += tickdelta;
} else {
time_update = tick + tickdelta;
timedelta -= tickdelta;
}
time_update = tick + tickdelta;
timedelta -= tickdelta;
}
BUMPTIME(&mono_time, time_update);