Re: PATCH: Remove unnecessary zero-initializations

Michael Snyder
2002-11-13T19:01:26Z

Felix Lee wrote:
>
> Daniel Jacobowitz <drow@mvista.com>:
> > Currently, thirteen files which provide a target_ops explicitly initialize
> > members they don't support to NULL.
>
> this is a style and readability issue. if every set of
> initializations is complete and mentions all members, even
> when "unnecessary", then it's easier to quickly check that
> an implementation correctly matches the specification. a
> statement like
> foo.bar = 0;
> indicates that the programmer was aware that foo.bar exists,
> thought about it, and decided that 0 is a correct value.

This is counter to the intention. We made the initializations
un-necessary on purpose, so that when a new target method gets
added, you don't have to go add a new " = NULL;" to every file
that doesn't implement it.