Date: Mon, 01 Jun 2009 11:06:57 -0700 From: Julian Elischer <julian@elischer.org> To: =?UTF-8?B?RGFnLUVybGluZyBTbcO4cmdyYXY=?= <des@des.no> Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, rse@FreeBSD.org, "M. Warner Losh" <imp@bsdimp.com> Subject: Re: svn commit: r193223 - head/bin/sh Message-ID: <4A2418C1.5020406@elischer.org> 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
Dag-Erling Smørgrav wrote:
> "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++)
>> 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 */
}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A2418C1.5020406>
