From 553d4e9283fe32ffdb8bd0707c63f380fd049229 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 1 Mar 2012 19:59:28 +0100 Subject: playlist/soundcloud: use config_dup_block_string() --- src/playlist/soundcloud_playlist_plugin.c | 8 +++----- 1 file 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; } -- cgit v1.2.3