aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-07-19 17:59:35 +0200
committerMax Kellermann <max@duempel.org>2009-07-19 17:59:35 +0200
commit7b92750622b2d0b2332ddf8e6f5a5824ac04249d (patch)
tree3a345e0d16bbbf0521f45858cbb3b1e5493ec1f3
parent09008cb0ec74e89b5053a1570832c3d8959ec766 (diff)
downloadmpd-7b92750622b2d0b2332ddf8e6f5a5824ac04249d.tar.gz
mpd-7b92750622b2d0b2332ddf8e6f5a5824ac04249d.tar.xz
mpd-7b92750622b2d0b2332ddf8e6f5a5824ac04249d.zip
tag_ape: converted apeItems and tagItems to global vars
Don't initialize those arrays each time tag_ape_load() is called.
Diffstat (limited to '')
-rw-r--r--src/tag_ape.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/tag_ape.c b/src/tag_ape.c
index d1249fcb2..189b66e8f 100644
--- a/src/tag_ape.c
+++ b/src/tag_ape.c
@@ -24,6 +24,26 @@
#include <stdio.h>
+static const char *const apeItems[7] = {
+ "title",
+ "artist",
+ "album",
+ "comment",
+ "genre",
+ "track",
+ "year"
+};
+
+static const int tagItems[7] = {
+ TAG_ITEM_TITLE,
+ TAG_ITEM_ARTIST,
+ TAG_ITEM_ALBUM,
+ TAG_ITEM_COMMENT,
+ TAG_ITEM_GENRE,
+ TAG_ITEM_TRACK,
+ TAG_ITEM_DATE,
+};
+
struct tag *
tag_ape_load(const char *file)
{
@@ -47,26 +67,6 @@ tag_ape_load(const char *file)
unsigned char reserved[8];
} footer;
- const char *apeItems[7] = {
- "title",
- "artist",
- "album",
- "comment",
- "genre",
- "track",
- "year"
- };
-
- int tagItems[7] = {
- TAG_ITEM_TITLE,
- TAG_ITEM_ARTIST,
- TAG_ITEM_ALBUM,
- TAG_ITEM_COMMENT,
- TAG_ITEM_GENRE,
- TAG_ITEM_TRACK,
- TAG_ITEM_DATE,
- };
-
fp = fopen(file, "r");
if (!fp)
return NULL;