From f1220da49cf6e815864b69e8fbee931bede1544e Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Sun, 13 Feb 2000 10:56:32 +0000 Subject: [PATCH] Fix sign reversal in adjtime(2). Approved by: jkh --- sys/kern/kern_clock.c | 2 +- sys/kern/kern_tc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_clock.c b/sys/kern/kern_clock.c index 02fb48a87468..6166e1cb2518 100644 --- a/sys/kern/kern_clock.c +++ b/sys/kern/kern_clock.c @@ -775,7 +775,7 @@ tco_forward(int force) tco->tc_poll_pps(tco); if (timedelta != 0) { tvt = boottime; - tvt.tv_usec -= tickdelta; + tvt.tv_usec += tickdelta; if (tvt.tv_usec >= 1000000) { tvt.tv_sec++; tvt.tv_usec -= 1000000; diff --git a/sys/kern/kern_tc.c b/sys/kern/kern_tc.c index 02fb48a87468..6166e1cb2518 100644 --- a/sys/kern/kern_tc.c +++ b/sys/kern/kern_tc.c @@ -775,7 +775,7 @@ tco_forward(int force) tco->tc_poll_pps(tco); if (timedelta != 0) { tvt = boottime; - tvt.tv_usec -= tickdelta; + tvt.tv_usec += tickdelta; if (tvt.tv_usec >= 1000000) { tvt.tv_sec++; tvt.tv_usec -= 1000000;