[OpenAFS-devel] [PATCH] flexelint: punctuation fixes
Russ Allbery
rra@stanford.edu
Mon, 01 Dec 2003 21:27:43 -0800
Jim Rees <rees@umich.edu> writes:
> There is nothing there about semicolon on a one-line for/while, and the
> only option gindent gives you is to put a blank before the semicolon.
> We are not using this option.
> I think it's entirely appropriate to discuss what we want to do about
> this case, and if we can reach agreement, fix the source. But in the
> absence of agreement we probably should leave the existing code alone.
For whatever it's worth, I'm a big fan of:
for (...; ...; ...)
;
as the way to do those sorts of loops. The semi-colon on a line by itself
screams "weirdness here" and makes people notice what's going on.
An alternative, if one is afraid of the semicolon getting lost, is:
for (...; ...; ...)
continue;
(which is akin to Python's pass).
--
Russ Allbery (rra@stanford.edu) <http://www.eyrie.org/~eagle/>