Subject: Re: CVS commit: src/sys/sys (protosw.h:1.39)
To: None <source-changes@netbsd.org>
From: David Laight <david@l8s.co.uk>
List: source-changes
Date: 08/29/2006 08:01:44
On Tue, Aug 29, 2006 at 10:56:03AM +0400, Valeriy E. Ushakov wrote:
> On Mon, Aug 28, 2006 at 20:29:29 -0700, Jason Thorpe wrote:
> 
> > Perhaps we should be using explicit structure initializers instead, e.g.
> > 
> > struct foo aFoo = {
> > 	.foo_field = 1,
> > 	.foo_member = "woot",

With a nice trailing ',' ...

> > };
> > 
> > Personally, I find:
> > 
> > 	{ .p_name = NULL }
> > 
> > a lot nicer than
> > 
> > 	{ 0, NULL { 0, 0 }, NULL, { NULL, NULL } }
> 
> Absolutely.

True - although you still don't want to have to initialise every element.
And for the zero-filled terminator of an array you don't need the clutter
of initialising all elements.

	David

-- 
David Laight: david@l8s.co.uk