From ea841ce1dedf48247c923b91937509dca0d7fc60 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Mon, 23 May 2016 21:11:17 +0200 Subject: [PATCH] gtimer: fix the ts.tv_sec assignment - coverity --- src/main.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main.c b/src/main.c index 8aaa8d9e3..13ee44a6f 100644 --- a/src/main.c +++ b/src/main.c @@ -654,6 +654,8 @@ mainloop(void) while (tvheadend_is_running()) { now = gdispatch_clock_update(); + ts.tv_sec = now + 3600; + ts.tv_nsec = 0; /* Global timers */ pthread_mutex_lock(&global_lock); @@ -667,9 +669,6 @@ mainloop(void) tvhdebug("gtimer", " gti %p expire %"PRItimet, gti, gti->gti_expire.tv_sec); #endif - ts.tv_sec += 3600; - ts.tv_nsec = 0; - while((gti = LIST_FIRST(>imers)) != NULL) { if (gti->gti_expire > now) { -- 2.47.3