]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
tvhlog: tvhlog_thread - remove dead code (coverity)
authorJaroslav Kysela <perex@perex.cz>
Fri, 3 Oct 2014 13:19:28 +0000 (15:19 +0200)
committerJaroslav Kysela <perex@perex.cz>
Fri, 3 Oct 2014 13:19:28 +0000 (15:19 +0200)
src/tvhlog.c

index 04f79d65356f05d4a957afecf2ed076afe92f9b7..c510fae9f064626b7a11efc41ee6d90c674a4a0e 100644 (file)
@@ -222,11 +222,10 @@ tvhlog_thread ( void *p )
   tvhlog_msg_t *msg;
 
   pthread_mutex_lock(&tvhlog_mutex);
-  while (1) {
+  while (tvhlog_run) {
 
     /* Wait */
     if (!(msg = TAILQ_FIRST(&tvhlog_queue))) {
-      if (!tvhlog_run) break;
       if (fp) {
         fclose(fp); // only issue here is we close with mutex!
                     // but overall performance will be higher
@@ -235,7 +234,6 @@ tvhlog_thread ( void *p )
       pthread_cond_wait(&tvhlog_cond, &tvhlog_mutex);
       continue;
     }
-    if (!msg) break;
     TAILQ_REMOVE(&tvhlog_queue, msg, link);
     tvhlog_queue_size--;
     if (tvhlog_queue_size < (TVHLOG_QUEUE_MAXSIZE / 2))