Date: Fri, 11 Feb 2005 22:31:36 +1100 (EST) From: Bruce Evans <bde@zeta.org.au> To: "M. Warner Losh" <imp@bsdimp.com> Cc: cvs-src@freebsd.org Subject: Re: cvs commit: src/sys/dev/ed if_ed.c Message-ID: <20050211220212.A32327@delplex.bde.org> In-Reply-To: <20050210.171927.40039592.imp@bsdimp.com> References: <200502102331.j1ANVRQP026186@repoman.freebsd.org> <20050210.171927.40039592.imp@bsdimp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 10 Feb 2005, M. Warner Losh wrote: > In message: <20050210155027.B49218@xorpc.icir.org> > Luigi Rizzo <rizzo@icir.org> writes: > : hm... it would have sufficed (and more obvious) > : to just put an empty statement without the 'continue' ? > : > : while (complicated-expr) > : ; > > No. But a bare ";" is a normal style (The Normal Style?), and is idomatic for C programmers. It is used in more than 100 lines in Lite2's /sys and in more than 200 lines in -current's /sys. It is only commented on in about 15% of the cases in -current. Bare "continue;"s are harder to grep for so I didn't look for them. The original bug: while (complicated-expr); may be just a style bug written by indent(1). indent(1) messes up loops with only a ";" statement in them, and this can be "fixed" using "continue;" but not using "; /* nothing */". Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050211220212.A32327>