]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
Fix separation of timeouts scheduled for exactly the same time
authorMiroslav Lichvar <mlichvar@redhat.com>
Thu, 9 Dec 2010 13:34:29 +0000 (14:34 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Thu, 9 Dec 2010 13:34:29 +0000 (14:34 +0100)
sched.c

diff --git a/sched.c b/sched.c
index dacc9d29354b9f8ed5ca499ba341b9027704108a..369b03ea7c825e4bba98b804c1f40ce911a44a35 100644 (file)
--- a/sched.c
+++ b/sched.c
@@ -346,8 +346,7 @@ SCH_AddTimeoutInClass(double min_delay, double separation,
         if (new_min_delay - diff < separation) {
           new_min_delay = diff + separation;
         }
-      }
-      if (new_min_delay < diff) {
+      } else {
         if (diff - new_min_delay < separation) {
           new_min_delay = diff + separation;
         }