]> git.tue.mpg.de Git - paraslash.git/commitdiff
mp4: Kill pointless stricmp macro.
authorAndre Noll <maan@tuebingen.mpg.de>
Mon, 9 Aug 2021 22:12:31 +0000 (00:12 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Mon, 30 May 2022 19:37:35 +0000 (21:37 +0200)
Just call strcasecmp() directly.

mp4.c

diff --git a/mp4.c b/mp4.c
index 32871727b345ab61ff3b0498a69de772c387cabd..98bfc52bc8f00eede546cace4971f23bd60f2c1b 100644 (file)
--- a/mp4.c
+++ b/mp4.c
@@ -1564,8 +1564,6 @@ struct membuffer {
        unsigned error;
 };
 
-#define stricmp strcasecmp
-
 static struct membuffer *membuffer_create(void)
 {
        const unsigned initial_size = 256;
@@ -1672,7 +1670,7 @@ static uint32_t meta_genre_to_index(const char *genrestr)
 {
        unsigned n;
        for (n = 0; n < sizeof (ID3v1GenreList) / sizeof (ID3v1GenreList[0]); n++) {
-               if (!stricmp(genrestr, ID3v1GenreList[n]))
+               if (!strcasecmp(genrestr, ID3v1GenreList[n]))
                        return n + 1;
        }
        return 0;
@@ -1700,7 +1698,7 @@ static const char *find_standard_meta(const char *name)   //returns atom name if f
 {
        unsigned n;
        for (n = 0; n < sizeof (stdmetas) / sizeof (stdmetas[0]); n++) {
-               if (!stricmp(name, stdmetas[n].name))
+               if (!strcasecmp(name, stdmetas[n].name))
                        return stdmetas[n].atom;
        }
        return 0;
@@ -1801,28 +1799,28 @@ static uint32_t create_ilst(const struct mp4ff_metadata *data, void **out_buffer
                const char *genre_ptr = 0, *tempo_ptr = 0;
                for (metaptr = 0; metaptr < data->count; metaptr++) {
                        struct mp4ff_tag *tag = &data->tags[metaptr];
-                       if (!stricmp(tag->item, "tracknumber") || !stricmp(tag->item, "track")) {
+                       if (!strcasecmp(tag->item, "tracknumber") || !strcasecmp(tag->item, "track")) {
                                if (tracknumber_ptr == 0)
                                        tracknumber_ptr = tag->value;
                                mask[metaptr] = 1;
-                       } else if (!stricmp(tag->item, "totaltracks")) {
+                       } else if (!strcasecmp(tag->item, "totaltracks")) {
                                if (totaltracks_ptr == 0)
                                        totaltracks_ptr = tag->value;
                                mask[metaptr] = 1;
-                       } else if (!stricmp(tag->item, "discnumber")
-                                       || !stricmp(tag->item, "disc")) {
+                       } else if (!strcasecmp(tag->item, "discnumber")
+                                       || !strcasecmp(tag->item, "disc")) {
                                if (discnumber_ptr == 0)
                                        discnumber_ptr = tag->value;
                                mask[metaptr] = 1;
-                       } else if (!stricmp(tag->item, "totaldiscs")) {
+                       } else if (!strcasecmp(tag->item, "totaldiscs")) {
                                if (totaldiscs_ptr == 0)
                                        totaldiscs_ptr = tag->value;
                                mask[metaptr] = 1;
-                       } else if (!stricmp(tag->item, "genre")) {
+                       } else if (!strcasecmp(tag->item, "genre")) {
                                if (genre_ptr == 0)
                                        genre_ptr = tag->value;
                                mask[metaptr] = 1;
-                       } else if (!stricmp(tag->item, "tempo")) {
+                       } else if (!strcasecmp(tag->item, "tempo")) {
                                if (tempo_ptr == 0)
                                        tempo_ptr = tag->value;
                                mask[metaptr] = 1;
@@ -2157,7 +2155,7 @@ static int32_t meta_find_by_name(const struct mp4ff *f, const char *item,
        uint32_t i;
 
        for (i = 0; i < f->tags.count; i++) {
-               if (!stricmp(f->tags.tags[i].item, item)) {
+               if (!strcasecmp(f->tags.tags[i].item, item)) {
                        *value = para_strdup(f->tags.tags[i].value);
                        return 1;
                }