svn commit: r240549 - head/sys/arm/tegra

mdf at FreeBSD.org mdf at FreeBSD.org
Sun Sep 16 15:09:21 UTC 2012


On Sun, Sep 16, 2012 at 2:53 AM, Alexey Dokuchaev <danfe at freebsd.org> wrote:
> On Sun, Sep 16, 2012 at 10:37:56AM +0100, Chris Rees wrote:
>> On 16 September 2012 10:28, Alexey Dokuchaev <danfe at freebsd.org> wrote:
>> > I thought preferred and more style(9) compliant way to code [empty
>> > endless loop] is:
>> >
>> >         for (;;)
>> >                 continue;
>>
>> Actually:
>>
>> for (;;)
>>         ;
>
> Explicit "continue" is supposed to tell reviewer that original author did
> not make a typo, but indeed knew what he was doing.  Lonely semicolon is too
> ambiguous in this case.

The semicolon being on its own line is not ambiguous, and is good
style everywhere.  A semicolon on the same line as a while or for is a
red flag that it may be unintentional.

Cheers,
matthew


More information about the svn-src-all mailing list