svn commit: r193223 - head/bin/sh
M. Warner Losh
imp at bsdimp.com
Mon Jun 1 18:23:43 UTC 2009
In message: <86vdnfq1t3.fsf at ds4.des.no>
Dag-Erling_Smørgrav <des at des.no> writes:
: "M. Warner Losh" <imp at 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
More information about the svn-src-all
mailing list