aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputPlugins/_flac_common.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/inputPlugins/_flac_common.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/inputPlugins/_flac_common.c b/src/inputPlugins/_flac_common.c
index 79a3c38f2..93067ae68 100644
--- a/src/inputPlugins/_flac_common.c
+++ b/src/inputPlugins/_flac_common.c
@@ -114,13 +114,16 @@ static unsigned int commentMatchesAddToTag(
MpdTag ** tag)
{
const char * str;
+ size_t slen;
+ int vlen;
+
switch (itemType) {
case TAG_ITEM_TRACK: str = VORBIS_COMMENT_TRACK_KEY; break;
case TAG_ITEM_DISC: str = VORBIS_COMMENT_DISC_KEY; break;
default: str = mpdTagItemKeys[itemType];
}
- size_t slen = strlen(str);
- int vlen = entry->length - slen - 1;
+ slen = strlen(str);
+ vlen = entry->length - slen - 1;
if ((vlen > 0) && (0 == strncasecmp(str,(char *)entry->entry, slen))
&& (*(entry->entry + slen) == '=')) {