From: Andre Noll Date: Tue, 13 Mar 2007 23:05:21 +0000 (+0100) Subject: vss.c: simplify vss_eof() X-Git-Tag: v0.2.16~19 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=3450a4ee2962926a58b0e48bb19f8a7544450518;p=paraslash.git vss.c: simplify vss_eof() the function was never called with af == NULL, so kill the check. This check was the only real use of this parameter, so kill the parameter as well. --- diff --git a/vss.c b/vss.c index 042db041..8e9c17bf 100644 --- a/vss.c +++ b/vss.c @@ -361,13 +361,13 @@ static struct timeval *vss_compute_timeout(void) return &the_timeout; } -static void vss_eof(struct audio_format_handler *af) +static void vss_eof(void) { struct timeval now; int i; char *tmp; - if (!af || !map) { + if (!map) { for (i = 0; senders[i].name; i++) senders[i].shutdown_clients(); return; @@ -378,7 +378,6 @@ static void vss_eof(struct audio_format_handler *af) map = NULL; close(audio_file); mmd->audio_format = -1; - af = NULL; mmd->chunks_sent = 0; mmd->offset = 0; mmd->afi.seconds_total = 0; @@ -472,7 +471,7 @@ again: for (i = 0; senders[i].name; i++) senders[i].shutdown_clients(); if (vss_next() && af) { - vss_eof(af); + vss_eof(); return vss_compute_timeout(); } if (vss_paused() || vss_repos()) { @@ -535,7 +534,7 @@ void vss_send_chunk(void) mmd->new_vss_status_flags &= ~VSS_REPOS; if (mmd->current_chunk >= mmd->afi.chunks_total) { /* eof */ mmd->new_vss_status_flags |= VSS_NEXT; - return vss_eof(af); + return vss_eof(); } pos = mmd->afi.chunk_table[mmd->current_chunk]; len = mmd->afi.chunk_table[mmd->current_chunk + 1] - pos;