Subject: Re: [iproute PATCH v2 1/1] color: use "light" colors for dark background

From: Stephen Hemminger <[email-masked]>
Date: Wed, 1 Mar 2017 10:01:30 -0800

On Mon, 27 Feb 2017 10:55:27 +0100
Petr Vorel <[email-masked]> 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);