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

Re: svn commit: r13569 - in branches/locking/subversion: clients/cmdline include libsvn_client libsvn_ra libsvn_ra_dav libsvn_ra_local libsvn_ra_svn libsvn_repos libsvn_subr libsvn_wc tests/clients/cmdline tests/clients/cmdline/svntest

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2005-03-22 02:35:32 CET

sussman@tigris.org writes:

> Author: sussman
> Date: Mon Mar 21 19:03:35 2005
> New Revision: 13569

> +svn_error_t *
> +svn_error_dup (svn_error_t *err)
> +{
> + apr_pool_t *pool;
> + svn_error_t *new_err = NULL, *tmp_err;
> +
> + if (apr_pool_create (&pool, NULL))
> + abort ();
> +
> + for (; err; err = err->child)
> + {
> + if (! new_err)
> + {
> + new_err = apr_palloc (pool, sizeof (*new_err));
> + tmp_err = new_err;
> + }
> + else
> + {
> + tmp_err->child = apr_palloc (pool, sizeof (*tmp_err->child));
> + tmp_err = tmp_err->child;
> + }
> + *tmp_err = *err;
> + tmp_err->pool = pool;
> + if (tmp_err->message)
> + tmp_err->message = apr_pstrdup (pool, tmp_err->message);
> + }
> +
> + return new_err;
> +}

It looks like this is missing the SVN_DEBUG_ERROR pool cleanup stuff.
Perhaps svn_error_dup and svn_error_compose could share some code?
The code above checks if message is NULL before doing apr_pstrdup
while svn_error_compose doesn't bother, can both be correct?

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Mar 22 02:36:43 2005

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.