aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-03-01 19:59:28 +0100
committerMax Kellermann <max@duempel.org>2012-03-01 20:11:09 +0100
commit553d4e9283fe32ffdb8bd0707c63f380fd049229 (patch)
tree25e80ed3eb5d8087d30b415ee68f9d6a67994920
parent7cef52478dc2d5c5b9d2a75e34e4e57ca5cdb122 (diff)
downloadmpd-553d4e9283fe32ffdb8bd0707c63f380fd049229.tar.gz
mpd-553d4e9283fe32ffdb8bd0707c63f380fd049229.tar.xz
mpd-553d4e9283fe32ffdb8bd0707c63f380fd049229.zip
playlist/soundcloud: use config_dup_block_string()
Diffstat (limited to '')
-rw-r--r--src/playlist/soundcloud_playlist_plugin.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/playlist/soundcloud_playlist_plugin.c b/src/playlist/soundcloud_playlist_plugin.c
index b987de962..ddaf4e96b 100644
--- a/src/playlist/soundcloud_playlist_plugin.c
+++ b/src/playlist/soundcloud_playlist_plugin.c
@@ -43,16 +43,14 @@ static struct {
static bool
soundcloud_init(const struct config_param *param)
{
- const char *apikey = config_get_block_string(param, "apikey", NULL);
-
- if (apikey == NULL) {
+ soundcloud_config.apikey =
+ config_dup_block_string(param, "apikey", NULL);
+ if (soundcloud_config.apikey == NULL) {
g_debug("disabling the soundcloud playlist plugin "
"because API key is not set");
return false;
}
- soundcloud_config.apikey = g_strdup(apikey);
-
return true;
}