]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
reference: fix offset sign in log message
authorMiroslav Lichvar <mlichvar@redhat.com>
Wed, 20 May 2020 10:53:16 +0000 (12:53 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Thu, 21 May 2020 10:20:11 +0000 (12:20 +0200)
In the maxchange check, log the original offset instead of the absolute
value.

reference.c

index 4602000a8a869c164f980b700dee91a2b3b3a8df..553bc96494f727fdc09cde0920a93034388c4f44 100644 (file)
@@ -555,8 +555,7 @@ is_offset_ok(double offset)
     return 1;
   }
 
-  offset = fabs(offset);
-  if (offset > max_offset) {
+  if (fabs(offset) > max_offset) {
     LOG(LOGS_WARN, 
         "Adjustment of %.3f seconds exceeds the allowed maximum of %.3f seconds (%s) ",
         -offset, max_offset, !max_offset_ignore ? "exiting" : "ignored");