audiod: Kill another unused variable
[paraslash.git] / audiod.c
index cd43f24..107fb35 100644 (file)
--- a/audiod.c
+++ b/audiod.c
@@ -448,11 +448,21 @@ static void kill_stream_writer(int slot_num)
        s->fci->error = 1;
 }
 
+static void set_restart_barrier(int format, struct timeval *now)
+{
+       struct timeval tmp;
+
+       if (now)
+               tmp = *now;
+       else
+               gettimeofday(&tmp, NULL);
+       tv_add(&tmp, &restart_delay, &afi[format].restart_barrier);
+}
+
 static void close_receiver(int slot_num)
 {
        struct slot_info *s = &slot[slot_num];
        struct audio_format_info *a;
-       struct timeval now;
 
        if (s->format < 0 || !s->receiver_node)
                return;
@@ -462,8 +472,7 @@ static void close_receiver(int slot_num)
        a->receiver->close(s->receiver_node);
        free(s->receiver_node);
        s->receiver_node = NULL;
-       gettimeofday(&now, NULL);
-       tv_add(&now, &restart_delay, &a->restart_barrier); /* FIXME: Use set_restart_barrier() */
+       set_restart_barrier(s->format, NULL);
 }
 
 static void kill_all_decoders(void)
@@ -477,17 +486,6 @@ static void kill_all_decoders(void)
                }
 }
 
-static void set_restart_barrier(int format, struct timeval *now)
-{
-       struct timeval tmp;
-
-       if (now)
-               tmp = *now;
-       else
-               gettimeofday(&tmp, NULL);
-       tv_add(&tmp, &restart_delay, &afi[format].restart_barrier);
-}
-
 static void check_sigchld(void)
 {
        pid_t pid;