]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
Replace LOG_FATAL call with assert in SCH_MailLoop
authorMiroslav Lichvar <mlichvar@redhat.com>
Fri, 14 Jun 2013 10:34:52 +0000 (12:34 +0200)
committerMiroslav Lichvar <mlichvar@redhat.com>
Fri, 14 Jun 2013 10:35:51 +0000 (12:35 +0200)
sched.c

diff --git a/sched.c b/sched.c
index 06eed1bbca80c1b463eaf4612f668f229d685563..c2758050f820989e5cecc4403334893373b58ef4 100644 (file)
--- a/sched.c
+++ b/sched.c
@@ -589,10 +589,7 @@ SCH_MainLoop(void)
 
     /* if there are no file descriptors being waited on and no
        timeout set, this is clearly ridiculous, so stop the run */
-
-    if (!ptv && (n_read_fds == 0)) {
-      LOG_FATAL(LOGF_Scheduler, "No descriptors or timeout to wait for");
-    }
+    assert(ptv || n_read_fds);
 
     status = select(one_highest_fd, &rd, NULL, NULL, ptv);
 
@@ -616,8 +613,6 @@ SCH_MainLoop(void)
       dispatch_filehandlers(status, &rd);
 
     } else {
-      assert(status == 0);
-
       /* No descriptors readable, timeout must have elapsed.
        Therefore, tv must be non-null */
       assert(ptv);