diff options
author | Max Kellermann <max@duempel.org> | 2009-01-18 19:37:27 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-01-18 19:37:27 +0100 |
commit | a531a1e65075d27574bc31d4bac7ab20cb750efd (patch) | |
tree | f06ad8e7359f0845d94d2b8a6f655a0cceb744c2 /src/output/fifo_plugin.c | |
parent | 73e466cfef6497aff840cfac35d80d74e7b0fd0c (diff) | |
download | mpd-a531a1e65075d27574bc31d4bac7ab20cb750efd.tar.gz mpd-a531a1e65075d27574bc31d4bac7ab20cb750efd.tar.xz mpd-a531a1e65075d27574bc31d4bac7ab20cb750efd.zip |
conf: added config_get_block_string()
This replaces lots of getBlockParam() invocations.
Diffstat (limited to 'src/output/fifo_plugin.c')
-rw-r--r-- | src/output/fifo_plugin.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/output/fifo_plugin.c b/src/output/fifo_plugin.c index 01db714cf..5d1f287b2 100644 --- a/src/output/fifo_plugin.c +++ b/src/output/fifo_plugin.c @@ -164,19 +164,18 @@ static void *fifo_initDriver(G_GNUC_UNUSED struct audio_output *ao, struct config_param *param) { FifoData *fd; - struct block_param *blockParam; - char *path; + char *value, *path; - blockParam = getBlockParam(param, "path"); - if (!blockParam) { + value = config_dup_block_string(param, "path", NULL); + if (value == NULL) g_error("No \"path\" parameter specified for fifo output " "defined at line %i", param->line); - } - path = parsePath(blockParam->value); + path = parsePath(value); + g_free(value); if (!path) { g_error("Could not parse \"path\" parameter for fifo output " - "at line %i", blockParam->line); + "at line %i", param->line); } fd = newFifoData(); |