[chrony-dev] [PATCH] MacOSX - Incorrect sign in apply_step_offset()

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-dev Archives ]


The desired offset was being added to the current time instead of being subtracted.
---
 sys_macosx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys_macosx.c b/sys_macosx.c
index c1592dd..fb2a70e 100644
--- a/sys_macosx.c
+++ b/sys_macosx.c
@@ -248,7 +248,7 @@ apply_step_offset(double offset)
     return 0;
   }
 
-  UTI_AddDoubleToTimeval(&T0, offset, &T1);
+  UTI_AddDoubleToTimeval(&T0, -offset, &T1);
   T0 = T1;
 
   start_adjust();
-- 
2.4.9 (Apple Git-60)


-- 
To unsubscribe email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject.
For help email chrony-dev-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/