subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danie...@apache.org
Subject svn commit: r1503030 - /subversion/trunk/subversion/libsvn_subr/error.c
Date Sun, 14 Jul 2013 19:10:04 GMT
Author: danielsh
Date: Sun Jul 14 19:10:04 2013
New Revision: 1503030

URL: http://svn.apache.org/r1503030
Log:
* subversion/libsvn_subr/error.c
  (svn_strerror): Describe APR errors as coming from APR, for clarity.

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

Modified: subversion/trunk/subversion/libsvn_subr/error.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/error.c?rev=1503030&r1=1503029&r2=1503030&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/error.c (original)
+++ subversion/trunk/subversion/libsvn_subr/error.c Sun Jul 14 19:10:04 2013
@@ -669,6 +669,7 @@ char *
 svn_strerror(apr_status_t statcode, char *buf, apr_size_t bufsize)
 {
   const err_defn *defn;
+  apr_size_t offset = 0;
 
   for (defn = error_table; defn->errdesc != NULL; ++defn)
     if (defn->errcode == (svn_errno_t)statcode)
@@ -677,7 +678,13 @@ svn_strerror(apr_status_t statcode, char
         return buf;
       }
 
-  return apr_strerror(statcode, buf, bufsize);
+  if (bufsize > 5)
+    {
+      strcpy(buf, "APR: ");
+      offset = 5;
+    }
+
+  return apr_strerror(statcode, buf + offset, bufsize) - offset;
 }
 
 #ifdef SVN_DEBUG



Mime
View raw message