[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r14478 - in trunk/subversion: tests/libsvn_subr

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2005-04-28 21:20:10 CEST

(The code at issue follows; Peter asked that the for loop body be put in

+ for(j = 0; path[j]; ++j)
+ if (path[j] == ':' || path[j] == '/')
+ break;

On Thu, 2005-04-28 at 14:00, Philip Martin wrote:
> Really? I wasn't aware we had such a convention. I don't think the
> code in question needs braces, if some convention "requires" that they
> be added then I think the convention should be changed. Stupid rules
> don't help.

I don't think it's consistent with our code base to have multi-line (but
single-statement) for loop bodies without braces. Every rule of style
can seem like a "stupid rule" to someone who either isn't used to it or
temperamentally doesn't benefit from it, but consistency is more
important than making every developer happy. (And yes, in retrospect I
think we should have been consistent about space-before-paren for
function calls across the entire source code base, even if I'm one of
the dissenters on that front.)

That said, I don't think there's any specific rule about this in HACKING
or in the GNU C standards.

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Apr 28 21:57:20 2005

This is an archived mail posted to the Subversion Dev mailing list.