From owner-svn-src-head@FreeBSD.ORG Mon Jun 1 18:23:42 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9B25D106566B; Mon, 1 Jun 2009 18:23:42 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 51E208FC12; Mon, 1 Jun 2009 18:23:42 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id n51IKiE6095675; Mon, 1 Jun 2009 12:20:44 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 01 Jun 2009 12:20:54 -0600 (MDT) Message-Id: <20090601.122054.1585999559.imp@bsdimp.com> To: des@des.no From: "M. Warner Losh" In-Reply-To: <86vdnfq1t3.fsf@ds4.des.no> References: <200906011111.n51BBkZt077175@svn.freebsd.org> <20090601.104358.-345495454.imp@bsdimp.com> <86vdnfq1t3.fsf@ds4.des.no> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, rse@freebsd.org Subject: Re: svn commit: r193223 - head/bin/sh X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Jun 2009 18:23:43 -0000 In message: <86vdnfq1t3.fsf@ds4.des.no> Dag-Erling_Sm=F8rgrav writes: : "M. Warner Losh" writes: : > : @@ -187,7 +187,8 @@ padvance(char **path, char *name) : > : if (*path =3D=3D NULL) : > : return NULL; : > : start =3D *path; : > : - for (p =3D start ; *p && *p !=3D ':' && *p !=3D '%' ; p++); : > : + for (p =3D start; *p && *p !=3D ':' && *p !=3D '%'; p++) : > : + ; /* nothing */ : > : > C already has a way of saying this: : > : > for (p =3D start; *p && *p !=3D ':' && *p !=3D '%'; p++) : > continue; : = : It's a matter of taste. There is plenty of precedent for : = : /* nothing */ ; : = : and some for : = : ; /* nothing */ : = : (for varying spellings of "nothing") in the tree. True. I had some experience with early static analysis tools preferred the continue form because for them it was clear that you indented to do nothing. I suppose that the state of the art has progressed since then (this was like mid 1990's). Warner