lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20170301100130.38f00a3c@xeon-e3>
Date:   Wed, 1 Mar 2017 10:01:30 -0800
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     Petr Vorel <pvorel@...e.cz>
Cc:     netdev@...r.kernel.org, Mathias Nyman <m.nyman@....fi>,
        Yegor Yefremov <yegorslists@...glemail.com>
Subject: Re: [iproute PATCH v2 1/1] color: use "light" colors for dark
 background

On Mon, 27 Feb 2017 10:55:27 +0100
Petr Vorel <pvorel@...e.cz> 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);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ