From owner-cvs-all@FreeBSD.ORG Fri Feb 11 11:31:52 2005 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A4C3716A4CE; Fri, 11 Feb 2005 11:31:52 +0000 (GMT) Received: from mailout1.pacific.net.au (mailout1.pacific.net.au [61.8.0.84]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0ED6743D2F; Fri, 11 Feb 2005 11:31:52 +0000 (GMT) (envelope-from bde@zeta.org.au) Received: from mailproxy1.pacific.net.au (mailproxy1.pacific.net.au [61.8.0.86])j1BBVfA6026231; Fri, 11 Feb 2005 22:31:41 +1100 Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) j1BBVbTv013362; Fri, 11 Feb 2005 22:31:39 +1100 Date: Fri, 11 Feb 2005 22:31:36 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: "M. Warner Losh" In-Reply-To: <20050210.171927.40039592.imp@bsdimp.com> Message-ID: <20050211220212.A32327@delplex.bde.org> References: <200502102331.j1ANVRQP026186@repoman.freebsd.org> <20050210.171927.40039592.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: rizzo@icir.org cc: src-committers@freebsd.org cc: cvs-all@freebsd.org cc: cvs-src@freebsd.org Subject: Re: cvs commit: src/sys/dev/ed if_ed.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Feb 2005 11:31:52 -0000 On Thu, 10 Feb 2005, M. Warner Losh wrote: > In message: <20050210155027.B49218@xorpc.icir.org> > Luigi Rizzo 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