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]
Date:	Mon, 14 May 2012 23:49:12 +0200
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Sasha Levin <levinsasha928@...il.com>
Cc:	edumazet@...gle.com, dave.taht@...ferbloat.net,
	davem@...emloft.net, linux-kernel@...r.kernel.org,
	netdev@...r.kernel.org
Subject: Re: [PATCH] net: codel: fix build errors

On Mon, 2012-05-14 at 23:39 +0200, Sasha Levin wrote:
> On Mon, May 14, 2012 at 11:08 PM, Eric Dumazet <eric.dumazet@...il.com> wrote:
> > Anonymous unions are fine, we use them a lot in kernel.
> 
> While we use them a lot, we don't try initializing them that often.
> 
> > Please fix the initializers instead in fq_codel_dump_stats(), because
> > these two #define are not very nice.
> 
> The only method I know of fixing that up is getting braces around them
> in the initializer, which is hacky and will break every time a new
> member is added to the struct before the anonymous union. Is there a
> different solution?


instead of 

	struct foo x = {
		.field = value;
		.sub.f2 = xxx;
		...
	};

use :

	struct foo x = {
		.field = value;
	};

	x.sub.f2 = xxx;
	...


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ