cvs commit: src/sys/dev/led led.h
Eivind Eklund
eivind at FreeBSD.org
Mon May 10 07:26:21 PDT 2004
On Mon, May 10, 2004 at 03:13:13PM +0200, Maxime Henrion wrote:
> Eivind Eklund wrote:
> > Not a big deal, but a minor style issue:
> >
> > On Mon, May 10, 2004 at 04:50:40AM -0700, Maxime Henrion wrote:
> > > - Fix some style bugs while I'm here.
> >
> > [...]
> >
> > > -#endif /* _DEV_LED_H */
> > > +#endif
> >
> > Based in my presently installed /usr/include/sys, the style statistics
> > for /usr/include/sys/*.h is as follows:
> >
> > #endif #endif /* _DEV_LED_H */ #endif /* !_DEV_LED_H */
> > 28 52 148
> > 12% 23% 65%
> >
> > The removal of /* _DEV_LED_H */ from the last #endif brings it from an
> > uncommon style to an even less common style.
>
> Both styles are allowed by style(9) under different circumstances. If the
> #ifdef'ed block is big, then you should add the /* FOO_H */ comment. If
> it's not, you shouldn't put it, hence why I removed it. So this isn't a
> matter of which style is used most :-).
Given the frequencies involved, I think it would be better style to make
all full-file-wrapping ifdefs (which is what I counted above) be
consistant. There's only 12% that are really "off style", and
eliminating this seems better than increasing it or keeping it
consistent with #ifdef/#endif's inside files (WRT "long" or "short"
ifdef's)
NRN.
Eivind.
More information about the cvs-src
mailing list