]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
timers: little fixes
authorJaroslav Kysela <perex@perex.cz>
Mon, 10 Dec 2018 15:08:50 +0000 (16:08 +0100)
committerJaroslav Kysela <perex@perex.cz>
Mon, 10 Dec 2018 15:09:06 +0000 (16:09 +0100)
src/main.c

index 3b10f0c5957dbe5eb4ec7bc7897c8f7c0b2eca42..180635abe9c628929d06e6057001720ea82ead54 100644 (file)
@@ -677,10 +677,8 @@ mtimer_thread(void *aux)
   tvh_mutex_unlock(&mtimer_lock);
 
   while (tvheadend_is_running()) {
-    now = mdispatch_clock_update();
-
     /* Global monoclock timers */
-
+    now = mdispatch_clock_update();
     next = now + sec2mono(3600);
 
     while (1) {
@@ -749,10 +747,9 @@ mainloop(void)
       tvh_mutex_lock(&gtimer_lock);
       gti = LIST_FIRST(&gtimers);
       if (gti == NULL || gti->gti_expire > now) {
-        if (gti) {
+        if (gti)
           ts.tv_sec = gti->gti_expire;
-          tvh_mutex_unlock(&gtimer_lock);
-        }
+        tvh_mutex_unlock(&gtimer_lock);
         break;
       }