diff options
author | Max Kellermann <max@duempel.org> | 2011-09-17 20:11:51 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2011-09-17 20:11:51 +0200 |
commit | 567fe89a77410e805a567b20e4c9f7bf9720b950 (patch) | |
tree | c02e77cddeb0f9c450d36fd1f50c04351ff55cb5 /src/output | |
parent | 950772ab8af782e6597173344746e40593adffa9 (diff) | |
download | mpd-567fe89a77410e805a567b20e4c9f7bf9720b950.tar.gz mpd-567fe89a77410e805a567b20e4c9f7bf9720b950.tar.xz mpd-567fe89a77410e805a567b20e4c9f7bf9720b950.zip |
output/roar: use config_get_block_string() for temporary
Diffstat (limited to 'src/output')
-rw-r--r-- | src/output/roar_output_plugin.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/output/roar_output_plugin.c b/src/output/roar_output_plugin.c index 2707d33ec..b92efd4cb 100644 --- a/src/output/roar_output_plugin.c +++ b/src/output/roar_output_plugin.c @@ -95,14 +95,11 @@ roar_configure(struct roar * self, const struct config_param *param) { self->host = config_dup_block_string(param, "server", NULL); self->name = config_dup_block_string(param, "name", "MPD"); - char *role = config_dup_block_string(param, "role", "music"); - if (role != NULL) - { - self->role = roar_str2role(role); - g_free(role); - } - else - self->role = ROAR_ROLE_MUSIC; + + const char *role = config_get_block_string(param, "role", "music"); + self->role = role != NULL + ? roar_str2role(role) + : ROAR_ROLE_MUSIC; } static void * |