]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
vss.c: simplify vss_eof()
authorAndre Noll <maan@systemlinux.org>
Tue, 13 Mar 2007 23:05:21 +0000 (00:05 +0100)
committerAndre Noll <maan@systemlinux.org>
Tue, 13 Mar 2007 23:05:21 +0000 (00:05 +0100)
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.

vss.c

diff --git a/vss.c b/vss.c
index 042db04110590b721482e09257018e905c501e16..8e9c17bf48a623bd883274ce5f58dfd6a463f264 100644 (file)
--- a/vss.c
+++ b/vss.c
@@ -361,13 +361,13 @@ static struct timeval *vss_compute_timeout(void)
        return &the_timeout;
 }
 
        return &the_timeout;
 }
 
-static void vss_eof(struct audio_format_handler *af)
+static void vss_eof(void)
 {
        struct timeval now;
        int i;
        char *tmp;
 
 {
        struct timeval now;
        int i;
        char *tmp;
 
-       if (!af || !map) {
+       if (!map) {
                for (i = 0; senders[i].name; i++)
                        senders[i].shutdown_clients();
                return;
                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;
        map = NULL;
        close(audio_file);
        mmd->audio_format = -1;
-       af = NULL;
        mmd->chunks_sent = 0;
        mmd->offset = 0;
        mmd->afi.seconds_total = 0;
        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) {
                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()) {
                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;
        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;
        }
        pos = mmd->afi.chunk_table[mmd->current_chunk];
        len = mmd->afi.chunk_table[mmd->current_chunk + 1] - pos;