You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2010/08/11 01:26:56 UTC
svn commit: r984264 - in /subversion/branches/atomic-revprop/subversion:
include/svn_error.h libsvn_subr/error.c
Author: danielsh
Date: Tue Aug 10 23:26:55 2010
New Revision: 984264
URL: http://svn.apache.org/viewvc?rev=984264&view=rev
Log:
Tweak the behaviour of a recently-added API to allow conveniently passing
errors without first checking them for SVN_NO_ERROR/NULL.
* subversion/include/svn_error.h,
subversion/libsvn_subr/error.c
(svn_error_has_cause):
Document and implement the behaviour when passed SVN_NO_ERROR.
Modified:
subversion/branches/atomic-revprop/subversion/include/svn_error.h
subversion/branches/atomic-revprop/subversion/libsvn_subr/error.c
Modified: subversion/branches/atomic-revprop/subversion/include/svn_error.h
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/include/svn_error.h?rev=984264&r1=984263&r2=984264&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/include/svn_error.h (original)
+++ subversion/branches/atomic-revprop/subversion/include/svn_error.h Tue Aug 10 23:26:55 2010
@@ -195,6 +195,8 @@ svn_error_root_cause(svn_error_t *err);
/** Return TRUE if @a err's chain contains the error code @a apr_err.
*
+ * If @a err is #SVN_NO_ERROR, return FALSE.
+ *
* @since New in 1.7.
*/
svn_boolean_t
Modified: subversion/branches/atomic-revprop/subversion/libsvn_subr/error.c
URL: http://svn.apache.org/viewvc/subversion/branches/atomic-revprop/subversion/libsvn_subr/error.c?rev=984264&r1=984263&r2=984264&view=diff
==============================================================================
--- subversion/branches/atomic-revprop/subversion/libsvn_subr/error.c (original)
+++ subversion/branches/atomic-revprop/subversion/libsvn_subr/error.c Tue Aug 10 23:26:55 2010
@@ -274,10 +274,6 @@ svn_error_has_cause(svn_error_t *err, ap
{
svn_error_t *child;
- if (! err && ! apr_err)
- /* The API doesn't specify the behaviour when ERR is NULL. */
- return TRUE;
-
for (child = err; child; child = child->child)
if (child->apr_err == apr_err)
return TRUE;