aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Steven Schubiger <stsc@refcnt.org>2015-04-03 23:05:30 +0200
committerGravatar Steven Schubiger <stsc@refcnt.org>2015-04-03 23:05:30 +0200
commit37352ff84ca38cd738e7dfacfbee38d0575fbf83 (patch)
tree10b1c02d0a8bd5450f27f1b3a3103a8937675c2c
parent35fbd9e9d339d3c338f089cb9802b152c3dc01fd (diff)
downloadcolorize-37352ff84ca38cd738e7dfacfbee38d0575fbf83.tar.gz
colorize-37352ff84ca38cd738e7dfacfbee38d0575fbf83.tar.bz2
Declare color sets variables as constant
-rw-r--r--colorize.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/colorize.c b/colorize.c
index 9bd5c78..902e189 100644
--- a/colorize.c
+++ b/colorize.c
@@ -632,11 +632,11 @@ process_args (unsigned int arg_cnt, char **arg_strings, bool *bold, const struct
if (color_names[BACKGROUND])
{
unsigned int i;
- unsigned int color_sets[2][2] = { { FOREGROUND, BACKGROUND }, { BACKGROUND, FOREGROUND } };
+ const unsigned int color_sets[2][2] = { { FOREGROUND, BACKGROUND }, { BACKGROUND, FOREGROUND } };
for (i = 0; i < 2; i++)
{
- unsigned int color1 = color_sets[i][0];
- unsigned int color2 = color_sets[i][1];
+ const unsigned int color1 = color_sets[i][0];
+ const unsigned int color2 = color_sets[i][1];
if (CHECK_COLORS_RANDOM (color1, color2))
vfprintf_fail (formats[FMT_RANDOM], tables[color1].desc, color_names[color1]->orig, "cannot be combined with", color_names[color2]->orig);
}