lkml.org 
[lkml]   [2002]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] C99 initializers for drivers/media/radio
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/

\
 
 \ /
  Last update: 2005-03-22 13:31    [W:0.022 / U:3.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site