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

Re: svn commit: r19571 - trunk/subversion/libsvn_client

From: Peter N. Lundblad <peter_at_famlundblad.se>
Date: 2006-05-11 08:44:26 CEST

Greg Hudson writes:
> On Tue, 2006-05-09 at 02:31 -0700, lundblad@tigris.org wrote:
> > - b->wcpath = eb->target ? apr_pstrdup(pool, eb->target) : "";
> > + b->wcpath = apr_pstrdup(pool, eb->target);
>
> apr_pstrdup does not document that it accepts NULL as a second argument.
> Although we do rely on that behavior in some places, I don't think we
> ought to.

+1.

> More importantly, apr_pstrdup returns NULL when its second argument is
> NULL, which is different from the value "" used in the old code.
>

The point of this change is that eb->target may not be null, unless the
public APIs are misused.

Best,
//Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu May 11 08:50:35 2006

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.