changeset 34860:4a7962b0f3d4

Make array const and more compact.
author reimar
date Mon, 21 May 2012 19:17:55 +0000
parents 203d0d5cac1f
children bbbe5519f1e7
files sub/subreader.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/sub/subreader.c	Mon May 21 18:46:25 2012 +0000
+++ b/sub/subreader.c	Mon May 21 19:17:55 2012 +0000
@@ -1477,7 +1477,7 @@
 	    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;