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] [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

Powered by Openwall GNU/*/Linux Powered by OpenVZ