From df32eed2cc6ebc11dcecb954e0ddb3cdf329ce1f Mon Sep 17 00:00:00 2001 From: "J. Alexander Treuman" Date: Wed, 13 Jun 2007 15:37:46 +0000 Subject: Use parsePath for the fifo output's path parameter. git-svn-id: https://svn.musicpd.org/mpd/trunk@6623 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/audioOutputs/audioOutput_fifo.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/audioOutputs/audioOutput_fifo.c b/src/audioOutputs/audioOutput_fifo.c index 2fbbf5393..66c54dd7f 100644 --- a/src/audioOutputs/audioOutput_fifo.c +++ b/src/audioOutputs/audioOutput_fifo.c @@ -164,23 +164,23 @@ static int openFifo(FifoData *fd) static int fifo_initDriver(AudioOutput *audioOutput, ConfigParam *param) { FifoData *fd; - BlockParam *path = NULL; - - if (param) - path = getBlockParam(param, "path"); + BlockParam *blockParam; + char *path; - if (!path) { + blockParam = getBlockParam(param, "path"); + if (!blockParam) { FATAL("No \"path\" parameter specified for fifo output " "defined at line %i\n", param->line); } - if (path->value[0] != '/') { - FATAL("\"path\" parameter for fifo output is not an absolute " - "path at line %i\n", param->line); + path = parsePath(blockParam->value); + if (!path) { + FATAL("Could not parse \"path\" parameter for fifo output " + "at line %i\n", blockParam->line); } fd = newFifoData(); - fd->path = xstrdup(path->value); + fd->path = path; audioOutput->data = fd; if (openFifo(fd) < 0) { -- cgit v1.2.3