aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-02-25 19:09:38 +0100
committerMax Kellermann <max@duempel.org>2009-02-25 19:09:38 +0100
commitee7cf9c9b80a7888625b224132751c33f7b4c563 (patch)
tree3473d4e20e880bec5c22cb671a19e71c98cf1ca9 /src
parentba4dd651ef67238a67046e93fb8dc0f6162fec6c (diff)
downloadmpd-ee7cf9c9b80a7888625b224132751c33f7b4c563.tar.gz
mpd-ee7cf9c9b80a7888625b224132751c33f7b4c563.tar.xz
mpd-ee7cf9c9b80a7888625b224132751c33f7b4c563.zip
fifo: removed timer!=NULL checks
The MPD core guarantees that the audio_output object is always consistent, and our timer!=NULL checks are superfluous.
Diffstat (limited to 'src')
-rw-r--r--src/output/fifo_plugin.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/output/fifo_plugin.c b/src/output/fifo_plugin.c
index 2aef71947..da6d5d774 100644
--- a/src/output/fifo_plugin.c
+++ b/src/output/fifo_plugin.c
@@ -52,7 +52,6 @@ static FifoData *newFifoData(void)
ret->input = -1;
ret->output = -1;
ret->created = 0;
- ret->timer = NULL;
return ret;
}
@@ -60,10 +59,6 @@ static FifoData *newFifoData(void)
static void freeFifoData(FifoData *fd)
{
g_free(fd->path);
-
- if (fd->timer)
- timer_free(fd->timer);
-
g_free(fd);
}
@@ -202,9 +197,6 @@ static bool fifo_openDevice(void *data,
{
FifoData *fd = (FifoData *)data;
- if (fd->timer)
- timer_free(fd->timer);
-
fd->timer = timer_new(audio_format);
return true;
@@ -214,10 +206,7 @@ static void fifo_closeDevice(void *data)
{
FifoData *fd = (FifoData *)data;
- if (fd->timer) {
- timer_free(fd->timer);
- fd->timer = NULL;
- }
+ timer_free(fd->timer);
}
static void fifo_dropBufferedAudio(void *data)