changeset 3288:b8f57813338a libavformat

Use strcasecmp() instead of re-inventing it. Patch by Diego 'Flameeyes' Petten flameeyesATgmailPOINTcom
author benoit
date Mon, 12 May 2008 01:17:00 +0000
parents 8570df039c75
children 811c78fac294
files img2.c
diffstat 1 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/img2.c	Sun May 11 10:53:21 2008 +0000
+++ b/img2.c	Mon May 12 01:17:00 2008 +0000
@@ -22,6 +22,7 @@
 
 #include "libavutil/avstring.h"
 #include "avformat.h"
+#include <strings.h>
 
 typedef struct {
     int img_first;
@@ -102,11 +103,8 @@
     str++;
 
     while (tags->id) {
-        int i;
-        for(i=0; toupper(tags->str[i]) == toupper(str[i]); i++){
-            if(tags->str[i]==0 && str[i]==0)
-                return tags->id;
-        }
+        if (!strcasecmp(str, tags->str))
+            return tags->id;
 
         tags++;
     }