aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/wildmidi_decoder_plugin.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2010-05-31 10:14:48 +0200
committerMax Kellermann <max@duempel.org>2010-05-31 10:14:48 +0200
commit39105f2119c5cf31081a964b3218d20774fb1bb9 (patch)
tree65e25859dbad415394408702e0aaf67517570188 /src/decoder/wildmidi_decoder_plugin.c
parent4e080a9b06c3f46b4e92b820f0f087a38fc3940c (diff)
downloadmpd-39105f2119c5cf31081a964b3218d20774fb1bb9.tar.gz
mpd-39105f2119c5cf31081a964b3218d20774fb1bb9.tar.xz
mpd-39105f2119c5cf31081a964b3218d20774fb1bb9.zip
decoder/wildmidi: moved local variable declarations in tag_dup()
Diffstat (limited to 'src/decoder/wildmidi_decoder_plugin.c')
-rw-r--r--src/decoder/wildmidi_decoder_plugin.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/decoder/wildmidi_decoder_plugin.c b/src/decoder/wildmidi_decoder_plugin.c
index 60696fb1a..54eed48d9 100644
--- a/src/decoder/wildmidi_decoder_plugin.c
+++ b/src/decoder/wildmidi_decoder_plugin.c
@@ -110,21 +110,17 @@ wildmidi_file_decode(struct decoder *decoder, const char *path_fs)
static struct tag *
wildmidi_tag_dup(const char *path_fs)
{
- midi *wm;
- const struct _WM_Info *info;
- struct tag *tag;
-
- wm = WildMidi_Open(path_fs);
+ midi *wm = WildMidi_Open(path_fs);
if (wm == NULL)
return NULL;
- info = WildMidi_GetInfo(wm);
+ const struct _WM_Info *info = WildMidi_GetInfo(wm);
if (info == NULL) {
WildMidi_Close(wm);
return NULL;
}
- tag = tag_new();
+ struct tag *tag = tag_new();
tag->time = info->approx_total_samples / WILDMIDI_SAMPLE_RATE;
WildMidi_Close(wm);