]> git.sesse.net Git - vlc/commitdiff
Don't reinvent strcasecmp().
authorAntoine Cellerier <dionoea@videolan.org>
Mon, 6 Apr 2009 21:29:57 +0000 (23:29 +0200)
committerAntoine Cellerier <dionoea@videolan.org>
Mon, 6 Apr 2009 21:30:56 +0000 (23:30 +0200)
src/misc/image.c

index 86eeb452a8badc4f1a0ae596944f814ad05c3990..b0a808f82de35fa62dc996f15bfc905d42a5aaeb 100644 (file)
@@ -549,15 +549,8 @@ vlc_fourcc_t image_Type2Fourcc( const char *psz_type )
     int i;
 
     for( i = 0; ext_table[i].i_codec; i++ )
-    {
-        int j;
-        for( j = 0; toupper(ext_table[i].psz_ext[j]) == toupper(psz_type[j]);
-             j++ )
-        {
-            if( !ext_table[i].psz_ext[j] && !psz_type[j] )
-                return ext_table[i].i_codec;
-        }
-    }
+        if( !strcasecmp( ext_table[i].psz_ext, psz_type ) )
+            return ext_table[i].i_codec;
 
     return 0;
 }