svn commit: r233700 - head/sys/kern

Alexey Dokuchaev danfe at FreeBSD.org
Sat Mar 31 13:44:23 UTC 2012


On Sat, Mar 31, 2012 at 08:10:07PM +0900, Joerg Sonnenberger wrote:
> On Fri, Mar 30, 2012 at 09:49:51PM +0200, Dimitry Andric wrote:
> > On 2012-03-30 15:30, Stefan Farfeleder wrote:
> > >here are a few similar cases.
> > 
> > Hm, what about this one that clang warns about:
> > 
> >   sys/dev/asr/asr.c:2420:57: warning: for loop has empty body [-Wempty-body]
> > 	  for (ha = &Asr_softc_list; *ha; ha = &((*ha)->ha_next));
> 
> I would really just move the ha = into the loop body -- same semantic
> and no such issue as a dangling ;.

I usually write "continue;" instead of just lonely semicolon.  Allows to
keep "packed" for's and while's, and does not look ambiguous.

./danfe


More information about the svn-src-all mailing list