[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201012100440.0de0be16@hermes.local>
Date: Mon, 12 Oct 2020 10:04:40 -0700
From: Stephen Hemminger <stephen@...workplumber.org>
To: Jan Engelhardt <jengelh@...i.de>
Cc: netdev@...r.kernel.org
Subject: Re: [iproute PATCH v2] lib/color: introduce freely configurable
color strings
On Mon, 12 Oct 2020 18:46:39 +0200
Jan Engelhardt <jengelh@...i.de> wrote:
> +static struct color_code {
> + const char match[8], *code;
> + int len;
> +} color_codes[C_MAX] = {
> + {"iface="}, {"lladdr="}, {"v4addr="}, {"v6addr="}, {"operup="},
> + {"operdn="}, {"clear=", "0", 1},
> };
Probably better to expand the initializer here to be safe in future.
Also if each match has = that maybe redundant.
static struct color_code {
char match[8], *code;
unsigned int len;
} color_codes[] = {
[C_IFACE] = {
.match = "iface",
},
...
Powered by blists - more mailing lists