From 37352ff84ca38cd738e7dfacfbee38d0575fbf83 Mon Sep 17 00:00:00 2001 From: Steven Schubiger Date: Fri, 3 Apr 2015 23:05:30 +0200 Subject: Declare color sets variables as constant --- colorize.c | 6 +++--- 1 file 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); } -- cgit v1.2.3