On Mon, 27 Feb 2017 10:55:27 +0100
Petr Vorel <[email protected]> wrote:
> +void set_color_palette(void)
> +{
> + char *p = getenv("COLORFGBG");
> +
> + /*
> + * COLORFGBG environment variable usually contains either two or three
> + * values separated by semicolons; we want the last value in either
> case.
> + * If this value is 0-6 or 8, background is dark.
> + */
> + if (p && (p = (char *)strrchr(p, ';')) != NULL
Cast here is unnecessary. strrchr is defined as:
char *strrchr(const char *s, int c);