You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Garrett Rooney <ro...@electricjellyfish.net> on 2003/06/01 20:40:56 UTC
Re: svn commit: rev 6107 - in trunk/subversion: libsvn_subr tests/libsvn_subr
On Sunday, June 1, 2003, at 04:32 PM, cmpilato@tigris.org wrote:
> Modified: trunk/subversion/libsvn_subr/target.c
> =======================================================================
> =======
> --- trunk/subversion/libsvn_subr/target.c (original)
> +++ trunk/subversion/libsvn_subr/target.c Sun Jun 1 15:32:41 2003
> @@ -53,6 +53,18 @@
> return SVN_NO_ERROR;
> }
>
> + /* Get the absolute path of the first target. */
> + SVN_ERR (svn_path_get_absolute (pcommon,
> + APR_ARRAY_IDX (targets, 0, const
> char *),
> + pool));
> +
> + /* Early exit when there's only one path to work on. */
> + if (targets->nelts == 1)
> + {
> + if (pcondensed_targets)
> + *pcondensed_targets = apr_array_make (pool, 1, sizeof (const
> char *));
> + return SVN_NO_ERROR;
> + }
Umh, is it just me, or are you making an array of length one in
*pcondensed_targets, and then returning without actually putting
anything in it? that just doesn't seem right...
-garrett
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn commit: rev 6107 - in trunk/subversion: libsvn_subr tests/libsvn_subr
Posted by cm...@collab.net.
Garrett Rooney <ro...@electricjellyfish.net> writes:
> On Sunday, June 1, 2003, at 04:32 PM, cmpilato@tigris.org wrote:
>
> > Modified: trunk/subversion/libsvn_subr/target.c
> > =======================================================================
> > =======
> > --- trunk/subversion/libsvn_subr/target.c (original)
> > +++ trunk/subversion/libsvn_subr/target.c Sun Jun 1 15:32:41 2003
> > @@ -53,6 +53,18 @@
> > return SVN_NO_ERROR;
> > }
> >
> > + /* Get the absolute path of the first target. */
> > + SVN_ERR (svn_path_get_absolute (pcommon,
> > + APR_ARRAY_IDX (targets, 0, const
> > char *),
> > + pool));
> > +
> > + /* Early exit when there's only one path to work on. */
> > + if (targets->nelts == 1)
> > + {
> > + if (pcondensed_targets)
> > + *pcondensed_targets = apr_array_make (pool, 1, sizeof
> > (const char *));
> > + return SVN_NO_ERROR;
> > + }
>
> Umh, is it just me, or are you making an array of length one in
> *pcondensed_targets, and then returning without actually putting
> anything in it? that just doesn't seem right...
I just didn't know if it was legal to make an array of zero
elements. :-)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org