gcc 2.95 compatibility fixes
git-svn-id: https://svn.musicpd.org/mpd/trunk@4244 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
parent
02975fca00
commit
ab069b7e59
|
@ -114,13 +114,16 @@ static unsigned int commentMatchesAddToTag(
|
||||||
MpdTag ** tag)
|
MpdTag ** tag)
|
||||||
{
|
{
|
||||||
const char * str;
|
const char * str;
|
||||||
|
size_t slen;
|
||||||
|
int vlen;
|
||||||
|
|
||||||
switch (itemType) {
|
switch (itemType) {
|
||||||
case TAG_ITEM_TRACK: str = VORBIS_COMMENT_TRACK_KEY; break;
|
case TAG_ITEM_TRACK: str = VORBIS_COMMENT_TRACK_KEY; break;
|
||||||
case TAG_ITEM_DISC: str = VORBIS_COMMENT_DISC_KEY; break;
|
case TAG_ITEM_DISC: str = VORBIS_COMMENT_DISC_KEY; break;
|
||||||
default: str = mpdTagItemKeys[itemType];
|
default: str = mpdTagItemKeys[itemType];
|
||||||
}
|
}
|
||||||
size_t slen = strlen(str);
|
slen = strlen(str);
|
||||||
int vlen = entry->length - slen - 1;
|
vlen = entry->length - slen - 1;
|
||||||
|
|
||||||
if ((vlen > 0) && (0 == strncasecmp(str,(char *)entry->entry, slen))
|
if ((vlen > 0) && (0 == strncasecmp(str,(char *)entry->entry, slen))
|
||||||
&& (*(entry->entry + slen) == '=')) {
|
&& (*(entry->entry + slen) == '=')) {
|
||||||
|
|
|
@ -161,12 +161,13 @@ static inline unsigned int ogg_parseCommentAddToTag(char * comment,
|
||||||
unsigned int itemType, MpdTag ** tag)
|
unsigned int itemType, MpdTag ** tag)
|
||||||
{
|
{
|
||||||
const char * needle;
|
const char * needle;
|
||||||
|
unsigned int len;
|
||||||
switch (itemType) {
|
switch (itemType) {
|
||||||
case TAG_ITEM_TRACK: needle = VORBIS_COMMENT_TRACK_KEY; break;
|
case TAG_ITEM_TRACK: needle = VORBIS_COMMENT_TRACK_KEY; break;
|
||||||
case TAG_ITEM_DISC: needle = VORBIS_COMMENT_DISC_KEY; break;
|
case TAG_ITEM_DISC: needle = VORBIS_COMMENT_DISC_KEY; break;
|
||||||
default: needle = mpdTagItemKeys[itemType];
|
default: needle = mpdTagItemKeys[itemType];
|
||||||
}
|
}
|
||||||
unsigned int len = strlen(needle);
|
len = strlen(needle);
|
||||||
|
|
||||||
if(strncasecmp(comment, needle, len) == 0 && *(comment+len) == '=') {
|
if(strncasecmp(comment, needle, len) == 0 && *(comment+len) == '=') {
|
||||||
if (!*tag)
|
if (!*tag)
|
||||||
|
|
Loading…
Reference in New Issue