]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
hwclock: fix check of sample separation
authorMiroslav Lichvar <mlichvar@redhat.com>
Thu, 8 Dec 2016 10:21:13 +0000 (11:21 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Thu, 8 Dec 2016 13:47:38 +0000 (14:47 +0100)
hwclock.c

index bd94f343f3ef511da889050efbb54ffe62426db8..5ddd5b583a7c2602629353eb2005f84565a7316d 100644 (file)
--- a/hwclock.c
+++ b/hwclock.c
@@ -112,7 +112,7 @@ int
 HCL_NeedsNewSample(HCL_Instance clock, struct timespec *now)
 {
   if (!clock->n_samples ||
-      fabs(UTI_DiffTimespecsToDouble(now, &clock->local_ref) >= MIN_SAMPLE_SEPARATION))
+      fabs(UTI_DiffTimespecsToDouble(now, &clock->local_ref)) >= MIN_SAMPLE_SEPARATION)
     return 1;
 
   return 0;