Re: [PATCH] C99 initializers for drivers/media/radio
Jeff Garzik (jgarzik@pobox.com)
Sat, 30 Nov 2002 16:06:28 -0500
Bernd Eckenfels wrote:
> In article <20021130174509.GD10613@debian> you wrote:
>
>>Here's a patch set for switching drivers/media/radio to use C99
>>initializers. The patches are against 2.5.50.
>
> ...
>
>>static struct pcm20_device pcm20_unit = {
>>- freq: 87*16000,
>>- muted: 1,
>>- stereo: 0
>>+ .freq = 87*16000,
>>+ .muted = 1,
>>};
>
> ...
>
> IMHO it is not a good idea to skip default initilised members. IT is self
> documenting to see all members, and it is easier to change them, if
> required. Especially if the old code had it.
I think you are half-right :)
It is personal preference whether or not to list default initialized
members. However -- if the previous code [like the code above]
initialized all its members specifically, then the C99 initializers
cleanup should not change that practice.
Jeff
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/