subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bert Huijben" <b...@qqmail.nl>
Subject RE: svn commit: r1496434 - /subversion/trunk/subversion/svn/svn.c
Date Tue, 25 Jun 2013 13:35:05 GMT


> -----Original Message-----
> From: ivan@apache.org [mailto:ivan@apache.org]
> Sent: dinsdag 25 juni 2013 14:01
> To: commits@subversion.apache.org
> Subject: svn commit: r1496434 - /subversion/trunk/subversion/svn/svn.c
> 
> Author: ivan
> Date: Tue Jun 25 12:00:42 2013
> New Revision: 1496434
> 
> URL: http://svn.apache.org/r1496434
> Log:
> * subversion/svn/svn.c
>   (svn_cl__check_cancel): Validate passed cancel baton for better test
>    coverage.
> 
> Modified:
>     subversion/trunk/subversion/svn/svn.c
> 
> Modified: subversion/trunk/subversion/svn/svn.c
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/svn.c?rev=
> 1496434&r1=1496433&r2=1496434&view=diff
> ==========================================================
> ====================
> --- subversion/trunk/subversion/svn/svn.c (original)
> +++ subversion/trunk/subversion/svn/svn.c Tue Jun 25 12:00:42 2013
> @@ -1651,6 +1651,8 @@ signal_handler(int signum)
>  svn_error_t *
>  svn_cl__check_cancel(void *baton)
>  {
> +  /* Cancel baton should be always NULL in command line client. */
> +  SVN_ERR_ASSERT(baton == NULL);
>    if (cancelled)
>      return svn_error_create(SVN_ERR_CANCELLED, NULL, _("Caught signal"));
>    else

Nice fix.
I was thinking about adding this last weekend when I noticed the problem on dev@s.a.o.

Personally I would have used assert() to optimize the check away in release mode, but I don't
think this difference is measurable.

	Bert 



Mime
View raw message