From bd97ae7255cff7c6de6c85f4631e35df0ec46f98 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Mon, 15 Jan 2018 13:15:23 +0100 Subject: [PATCH] tweaks: set a modifier in a single place, for conciseness --- src/rcfile.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/rcfile.c b/src/rcfile.c index 483addb6..6be8dab0 100644 --- a/src/rcfile.c +++ b/src/rcfile.c @@ -591,7 +591,8 @@ short color_to_short(const char *colorname, bool *bright) if (strncasecmp(colorname, "bright", 6) == 0) { *bright = TRUE; colorname += 6; - } + } else + *bright = FALSE; if (strcasecmp(colorname, "green") == 0) return COLOR_GREEN; @@ -624,7 +625,7 @@ short color_to_short(const char *colorname, bool *bright) void parse_colors(char *ptr, int rex_flags) { short fg, bg; - bool bright = FALSE; + bool bright; char *item; if (!opensyntax) { @@ -779,8 +780,6 @@ colortype *parse_interface_color(char *combostr) { colortype *trio = nmalloc(sizeof(colortype)); - trio->bright = FALSE; - if (parse_color_names(combostr, &trio->fg, &trio->bg, &trio->bright)) { free(combostr); return trio;