Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
tvhlog: tvhlog_thread - remove dead code (coverity)
  • Loading branch information
perexg committed Oct 3, 2014
1 parent 0f592f4 commit fb30be0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/tvhlog.c
Expand Up @@ -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
Expand All @@ -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))
Expand Down

0 comments on commit fb30be0

Please sign in to comment.