On Mon, 12 Oct 2020 18:46:39 +0200 Jan Engelhardt <jeng...@inai.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", }, ...