From owner-svn-src-head@FreeBSD.ORG Mon Jun 1 18:06:59 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 056C91065680 for ; Mon, 1 Jun 2009 18:06:59 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outC.internet-mail-service.net (outc.internet-mail-service.net [216.240.47.226]) by mx1.freebsd.org (Postfix) with ESMTP id DC5FD8FC24 for ; Mon, 1 Jun 2009 18:06:58 +0000 (UTC) (envelope-from julian@elischer.org) Received: from idiom.com (mx0.idiom.com [216.240.32.160]) by out.internet-mail-service.net (Postfix) with ESMTP id 72DDB53305; Mon, 1 Jun 2009 11:06:58 -0700 (PDT) X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (home.elischer.org [216.240.48.38]) by idiom.com (Postfix) with ESMTP id 1BDDD2D6015; Mon, 1 Jun 2009 11:06:58 -0700 (PDT) Message-ID: <4A2418C1.5020406@elischer.org> Date: Mon, 01 Jun 2009 11:06:57 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.21 (Macintosh/20090302) MIME-Version: 1.0 To: =?UTF-8?B?RGFnLUVybGluZyBTbcO4cmdyYXY=?= References: <200906011111.n51BBkZt077175@svn.freebsd.org> <20090601.104358.-345495454.imp@bsdimp.com> <86vdnfq1t3.fsf@ds4.des.no> In-Reply-To: <86vdnfq1t3.fsf@ds4.des.no> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, rse@FreeBSD.org, "M. Warner Losh" 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:06:59 -0000 Dag-Erling Smørgrav wrote: > "M. Warner Losh" writes: >> : @@ -187,7 +187,8 @@ padvance(char **path, char *name) >> : if (*path == NULL) >> : return NULL; >> : start = *path; >> : - for (p = start ; *p && *p != ':' && *p != '%' ; p++); >> : + for (p = start; *p && *p != ':' && *p != '%'; p++) >> : + ; /* nothing */ >> >> C already has a way of saying this: >> >> for (p = start; *p && *p != ':' && *p != '%'; p++) >> contionue; > > 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. > > DES and just for bikeshed's sake, In non BSD code I prefer for (p = start; *p && *p != ':' && *p != '%'; p++) { /* Nothing */ } for (p = start; *p && *p != ':' && *p != '%'; p++) { /* Nothing extra */ }