aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/SongSave.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/SongSave.cxx b/src/SongSave.cxx
index c2e3afce5..18ac63d12 100644
--- a/src/SongSave.cxx
+++ b/src/SongSave.cxx
@@ -60,15 +60,13 @@ song_load(TextFile &file, Directory *parent, const char *uri,
Song *song = parent != nullptr
? Song::NewFile(uri, parent)
: Song::NewRemote(uri);
- char *line, *colon;
- TagType type;
- const char *value;
TagBuilder tag;
+ char *line;
while ((line = file.ReadLine()) != nullptr &&
strcmp(line, SONG_END) != 0) {
- colon = strchr(line, ':');
+ char *colon = strchr(line, ':');
if (colon == nullptr || colon == line) {
song->Free();
@@ -78,8 +76,9 @@ song_load(TextFile &file, Directory *parent, const char *uri,
}
*colon++ = 0;
- value = strchug_fast(colon);
+ const char *value = strchug_fast(colon);
+ TagType type;
if ((type = tag_name_parse(line)) != TAG_NUM_OF_ITEM_TYPES) {
tag.AddItem(type, value);
} else if (strcmp(line, "Time") == 0) {