All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: Petr Vorel <pvorel@suse.cz>
Cc: netdev@vger.kernel.org, Mathias Nyman <m.nyman@iki.fi>,
	Yegor Yefremov <yegorslists@googlemail.com>
Subject: Re: [iproute PATCH v2 1/1] color: use "light" colors for dark background
Date: Wed, 1 Mar 2017 10:01:30 -0800	[thread overview]
Message-ID: <20170301100130.38f00a3c@xeon-e3> (raw)
In-Reply-To: <20170227095527.31134-1-pvorel@suse.cz>

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

      reply	other threads:[~2017-03-01 18:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-27  9:55 [iproute PATCH v2 1/1] color: use "light" colors for dark background Petr Vorel
2017-03-01 18:01 ` Stephen Hemminger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170301100130.38f00a3c@xeon-e3 \
    --to=stephen@networkplumber.org \
    --cc=m.nyman@iki.fi \
    --cc=netdev@vger.kernel.org \
    --cc=pvorel@suse.cz \
    --cc=yegorslists@googlemail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.