From f7212adf2159341127331436d2ddc9e1f7a21563 Mon Sep 17 00:00:00 2001 From: Andre Date: Mon, 3 Apr 2006 16:09:57 +0200 Subject: [PATCH] Fix use of uninitialized variable 'now' in afs_preselect() --- afs.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/afs.c b/afs.c index a73b18e0..6dac43d7 100644 --- a/afs.c +++ b/afs.c @@ -313,7 +313,7 @@ static struct timeval *afs_compute_timeout(void) if (chk_barrier("eof", &now, &eof_barrier, &the_timeout, 1) < 0) return &the_timeout; if (chk_barrier("data send", &now, &data_send_barrier, - &the_timeout, 1) < 0) + &the_timeout, 1) < 0) return &the_timeout; if (mmd->audio_format < 0 || !afs_playing() || !audio_file) return NULL; @@ -398,10 +398,9 @@ again: senders[i].shutdown_clients(); if (af) { struct timeval now; - if (!afs_paused() || mmd->chunks_sent) { - gettimeofday(&now, NULL); + gettimeofday(&now, NULL); + if (!afs_paused() || mmd->chunks_sent) tv_add(&af->eof_tv, &now, &eof_barrier); - } if (afs_repos()) tv_add(&now, &announce_tv, &data_send_barrier); if (mmd->new_afs_status_flags & AFS_NOMORE) @@ -415,7 +414,7 @@ again: mmd->new_afs_status_flags &= ~(AFS_REPOS); mmd->current_chunk = mmd->repos_request; } - ret = afs_compute_timeout(); + ret = afs_compute_timeout(); if (!ret && !audio_file && afs_playing() && !(mmd->new_afs_status_flags & AFS_NOMORE)) { PARA_DEBUG_LOG("%s", "ready and playing, but no audio file\n"); -- 2.39.2