Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
gtimer: fix the ts.tv_sec assignment - coverity
  • Loading branch information
perexg committed May 23, 2016
1 parent e687adf commit ea841ce
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/main.c
Expand Up @@ -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);
Expand All @@ -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(&gtimers)) != NULL) {

if (gti->gti_expire > now) {
Expand Down

0 comments on commit ea841ce

Please sign in to comment.