[MPlayer-cvslog] r34948 - trunk/sub/subreader.c

reimar subversion at mplayerhq.hu
Mon May 21 21:17:55 CEST 2012


Author: reimar
Date: Mon May 21 21:17:55 2012
New Revision: 34948

Log:
Make array const and more compact.

Modified:
   trunk/sub/subreader.c

Modified: trunk/sub/subreader.c
==============================================================================
--- trunk/sub/subreader.c	Mon May 21 20:46:25 2012	(r34947)
+++ trunk/sub/subreader.c	Mon May 21 21:17:55 2012	(r34948)
@@ -1477,7 +1477,7 @@ sub_data* sub_read_file (const char *fil
 	    int l,k;
 	    k = -1;
 	    if ((l=strlen(filename))>4){
-		    char *exts[] = {".utf", ".utf8", ".utf-8" };
+		    static const char exts[][8] = {".utf", ".utf8", ".utf-8" };
 		    for (k=3;--k>=0;)
 			if (l >= strlen(exts[k]) && !strcasecmp(filename+(l - strlen(exts[k])), exts[k])){
 			    sub_utf8 = 1;


More information about the MPlayer-cvslog mailing list