aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2010-05-31 10:16:09 +0200
committerMax Kellermann <max@duempel.org>2010-05-31 10:16:09 +0200
commite271f69a3469d91397714f14614bdf5796458dd1 (patch)
treeac97bada3743af01c196891cb7c5b762fc73c77c
parent39105f2119c5cf31081a964b3218d20774fb1bb9 (diff)
downloadmpd-e271f69a3469d91397714f14614bdf5796458dd1.tar.gz
mpd-e271f69a3469d91397714f14614bdf5796458dd1.tar.xz
mpd-e271f69a3469d91397714f14614bdf5796458dd1.zip
decoder/mikdmod: moved local variable declarations in tag_dup()
Diffstat (limited to '')
-rw-r--r--src/decoder/mikmod_decoder_plugin.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/decoder/mikmod_decoder_plugin.c b/src/decoder/mikmod_decoder_plugin.c
index 69212da59..c3d2ae4b0 100644
--- a/src/decoder/mikmod_decoder_plugin.c
+++ b/src/decoder/mikmod_decoder_plugin.c
@@ -179,13 +179,8 @@ mikmod_decoder_file_decode(struct decoder *decoder, const char *path_fs)
static struct tag *
mikmod_decoder_tag_dup(const char *path_fs)
{
- char *path2;
- struct tag *ret = NULL;
- MODULE *handle;
- char *title;
-
- path2 = g_strdup(path_fs);
- handle = Player_Load(path2, 128, 0);
+ char *path2 = g_strdup(path_fs);
+ MODULE *handle = Player_Load(path2, 128, 0);
g_free(path2);
if (handle == NULL) {
@@ -193,19 +188,20 @@ mikmod_decoder_tag_dup(const char *path_fs)
return NULL;
}
+
Player_Free(handle);
- ret = tag_new();
+ struct tag *tag = tag_new();
- ret->time = 0;
+ tag->time = 0;
path2 = g_strdup(path_fs);
- title = g_strdup(Player_LoadTitle(path2));
+ char *title = g_strdup(Player_LoadTitle(path2));
g_free(path2);
if (title)
- tag_add_item(ret, TAG_TITLE, title);
+ tag_add_item(tag, TAG_TITLE, title);
- return ret;
+ return tag;
}
static const char *const mikmod_decoder_suffixes[] = {