subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1482282 - /subversion/trunk/subversion/libsvn_subr/nls.c
Date Tue, 14 May 2013 10:03:51 GMT
Author: rhuijben
Date: Tue May 14 10:03:51 2013
New Revision: 1482282

URL: http://svn.apache.org/r1482282
Log:
* subversion/libsvn_subr/nls.c
  (svn_nls_init): Don't use an uninitialized variable to produce a very
    unlikely if not impossible to reach error.

Modified:
    subversion/trunk/subversion/libsvn_subr/nls.c

Modified: subversion/trunk/subversion/libsvn_subr/nls.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/nls.c?rev=1482282&r1=1482281&r2=1482282&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/nls.c (original)
+++ subversion/trunk/subversion/libsvn_subr/nls.c Tue May 14 10:03:51 2013
@@ -56,7 +56,6 @@ svn_nls_init(void)
       char* utf8_path;
       const char* internal_path;
       apr_pool_t* pool;
-      apr_status_t apr_err;
       apr_size_t inwords, outbytes, outlength;
 
       apr_pool_create(&pool, 0);
@@ -99,10 +98,10 @@ svn_nls_init(void)
 
           if (outbytes == 0)
             {
-              err = svn_error_createf(apr_err, NULL,
-                                      _("Can't convert module path "
-                                        "to UTF-8 from UCS-2: '%s'"),
-                                      ucs2_path);
+              err = svn_error_wrap_apr(apr_get_os_error(),
+                                       _("Can't convert module path "
+                                         "to UTF-8 from UCS-2: '%s'"),
+                                       ucs2_path);
             }
           else
             {



Mime
View raw message