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 2013/07/14 23:27:46 UTC
svn commit: r1503061 - /subversion/trunk/subversion/libsvn_subr/utf.c
Author: danielsh
Date: Sun Jul 14 21:27:46 2013
New Revision: 1503061
URL: http://svn.apache.org/r1503061
Log:
* subversion/libsvn_subr/utf.c
(xlate_alloc_handle): Simplify the error handling.
Patch by: rhuijben
Modified:
subversion/trunk/subversion/libsvn_subr/utf.c
Modified: subversion/trunk/subversion/libsvn_subr/utf.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/utf.c?rev=1503061&r1=1503060&r2=1503061&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/utf.c (original)
+++ subversion/trunk/subversion/libsvn_subr/utf.c Sun Jul 14 21:27:46 2013
@@ -256,15 +256,10 @@ xlate_alloc_handle(xlate_handle_node_t *
/* Just put the error on the stack, since svn_error_create duplicates it
later. APR_STRERR will be in the local encoding, not in UTF-8, though.
*/
-#ifdef SVN_DEBUG
- SVN_ERR_ASSERT(strlen(name) < sizeof(apr_strerr));
-#endif
- strcpy(apr_strerr, name);
- svn_strerror(apr_err, apr_strerr + strlen(apr_strerr),
- sizeof(apr_strerr) - strlen(apr_strerr));
- return svn_error_create(SVN_ERR_PLUGIN_LOAD_FAILURE,
- svn_error_create(apr_err, NULL, apr_strerr),
- errstr);
+ svn_strerror(apr_err, apr_strerr, sizeof(apr_strerr));
+ return svn_error_createf(SVN_ERR_PLUGIN_LOAD_FAILURE,
+ svn_error_create(apr_err, NULL, apr_strerr),
+ "%s: %s", name, errstr);
}
/* Allocate and initialize the node. */