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

Re: svn commit: r36066 - trunk/subversion/libsvn_subr

From: Greg Stein <gstein_at_gmail.com>
Date: Mon, 23 Feb 2009 08:18:02 +0100

On Mon, Feb 23, 2009 at 03:27, Bert Huijben <rhuijben_at_sharpsvn.net> wrote:
>...
> +++ trunk/subversion/libsvn_subr/stream.c Sun Feb 22 18:27:49 2009 (r36066)
> @@ -234,10 +234,11 @@ svn_error_t *svn_stream_copy3(svn_stream
> err2 = svn_stream_close(to);
> if (err)
> {
> - /* ### it would be nice to compose the two errors in some way */
> - svn_error_clear(err2); /* note: might be NULL */
> + if (err2)
> + svn_error_compose(err, err2);
> return err;
> }
> +
> return err2;
> }

Even simpler, compose_create is relatively new:

  err = ...
  return svn_error_compose_create(err, svn_stream_close(to));

If both are non-NULL, then it chains the second onto the first. If one
is NULL, then it returns the other. Otherwise, it returns NULL.

Cheers,
-g

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1213217
Received on 2009-02-23 08:18:37 CET

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.