From ee7cf9c9b80a7888625b224132751c33f7b4c563 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 25 Feb 2009 19:09:38 +0100 Subject: fifo: removed timer!=NULL checks The MPD core guarantees that the audio_output object is always consistent, and our timer!=NULL checks are superfluous. --- src/output/fifo_plugin.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'src') 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) -- cgit v1.2.3