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

Re: svn commit: r941309 - /subversion/trunk/subversion/libsvn_client/commit_util.c

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Wed, 05 May 2010 17:18:37 +0100

Philip Martin wrote:
> Greg Stein <gstein_at_gmail.com> writes:
>
> > On Wed, May 5, 2010 at 10:27, <philip_at_apache.org> wrote:
> >>...
> >> +++ subversion/trunk/subversion/libsvn_client/commit_util.c Wed May 5 14:27:45 2010
> >> @@ -1036,7 +1036,7 @@ svn_client__harvest_committables(apr_has
> >> for (i = 0; i < targets->nelts; ++i)
> >> {
> >> const svn_wc_entry_t *entry;
> >> - const char *target_abspath;
> >> + const char *url, *target_abspath;
> >> svn_boolean_t is_added;
> >> svn_error_t *err;
> >
> > Please use one line per variable declaration. Most code follows this
> > pattern, as it is easier to read (especially when initializers are
> > present).
> >
> > (and yes, we don't have a *rule* about this; I'm simply making a request)
>
> I don't see it as an improvement. Is there a consensus that one
> declaration per line is better?

I don't feel we should avoid it particularly. Just have an eye for
what's reasonable in the context.

Quick stats from "grep": We have nearly 900 lines of multiple
uninitialized declarations like this, out of nearly 17000 lines of
simple uninitialized declarations in total. Half our C source files use
this style at least once, the other half don't use it.

- Julian
Received on 2010-05-05 18:19:12 CEST

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.