# HG changeset patch # User Matti Hamalainen # Date 1526148130 -10800 # Node ID 228e71d6608972e9b489e59a1660d120e2a07558 # Parent 3b613fcbf3ff7b2f0bce034d7475d5e8626c0821 Constify. diff -r 3b613fcbf3ff -r 228e71d66089 tools/gfxconv.c --- a/tools/gfxconv.c Sat May 12 21:01:46 2018 +0300 +++ b/tools/gfxconv.c Sat May 12 21:02:10 2018 +0300 @@ -55,7 +55,7 @@ } DMConvFormat; -static DMConvFormat convFormatList[] = +static const DMConvFormat convFormatList[] = { { "ASCII text" , "asc" , DM_FMT_WR , FFMT_ASCII , 0 }, { "ANSI colored text" , "ansi" , DM_FMT_WR , FFMT_ANSI , 0 }, @@ -222,12 +222,11 @@ } -int dmGetConvFormat(int format, int subformat) +int dmGetConvFormat(const int format, const int subformat) { - int i; - for (i = 0; i < nconvFormatList; i++) + for (int i = 0; i < nconvFormatList; i++) { - DMConvFormat *fmt = &convFormatList[i]; + const DMConvFormat *fmt = &convFormatList[i]; if (fmt->format == format && fmt->subformat == subformat) return i; @@ -267,7 +266,7 @@ for (i = 0; i < nconvFormatList; i++) { - DMConvFormat *fmt = &convFormatList[i]; + const DMConvFormat *fmt = &convFormatList[i]; if (fmt->fext != NULL && strcasecmp(fext, fmt->fext) == 0) {