Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 01 Jun 2009 12:20:54 -0600 (MDT)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        des@des.no
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
Message-ID:  <20090601.122054.1585999559.imp@bsdimp.com>
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>

next in thread | previous in thread | raw e-mail | index | archive | help

In message: <86vdnfq1t3.fsf@ds4.des.no>
            Dag-Erling_Smørgrav <des@des.no> writes:
: "M. Warner Losh" <imp@bsdimp.com> 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++)
: > 		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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090601.122054.1585999559.imp>