summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-01-09 12:18:13 +0100
committerMax Kellermann <max@duempel.org>2014-01-09 12:18:13 +0100
commitdab052e53d91d7a54d557fb1d8fd762def4e1214 (patch)
treeef50c362ebdb2d90307da8584c1dbada93250e43 /src
parent322b0616322760dc162447563d8f4da7e024ca90 (diff)
playlist/asx: make variables more local
Diffstat (limited to 'src')
-rw-r--r--src/playlist/AsxPlaylistPlugin.cxx13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/playlist/AsxPlaylistPlugin.cxx b/src/playlist/AsxPlaylistPlugin.cxx
index 11bdc93d6..c06200283 100644
--- a/src/playlist/AsxPlaylistPlugin.cxx
+++ b/src/playlist/AsxPlaylistPlugin.cxx
@@ -182,21 +182,20 @@ static SongEnumerator *
asx_open_stream(InputStream &is)
{
AsxParser parser;
- GMarkupParseContext *context;
- char buffer[1024];
- size_t nbytes;
bool success;
Error error2;
GError *error = nullptr;
/* parse the ASX XML file */
- context = g_markup_parse_context_new(&asx_parser,
- G_MARKUP_TREAT_CDATA_AS_TEXT,
- &parser, nullptr);
+ GMarkupParseContext *context =
+ g_markup_parse_context_new(&asx_parser,
+ G_MARKUP_TREAT_CDATA_AS_TEXT,
+ &parser, nullptr);
while (true) {
- nbytes = is.LockRead(buffer, sizeof(buffer), error2);
+ char buffer[1024];
+ size_t nbytes = is.LockRead(buffer, sizeof(buffer), error2);
if (nbytes == 0) {
if (error2.IsDefined()) {
g_markup_parse_context_free(context);