You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ja...@apache.org on 2013/04/02 22:20:13 UTC

svn commit: r1463736 - /httpd/httpd/trunk/support/rotatelogs.c

Author: jailletc36
Date: Tue Apr  2 20:20:12 2013
New Revision: 1463736

URL: http://svn.apache.org/r1463736
Log:
Use apr_snprintf(... "%pm"...) instead of explicit call to apr_strerror

Modified:
    httpd/httpd/trunk/support/rotatelogs.c

Modified: httpd/httpd/trunk/support/rotatelogs.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/support/rotatelogs.c?rev=1463736&r1=1463735&r2=1463736&view=diff
==============================================================================
--- httpd/httpd/trunk/support/rotatelogs.c (original)
+++ httpd/httpd/trunk/support/rotatelogs.c Tue Apr  2 20:20:12 2013
@@ -668,19 +668,17 @@ int main (int argc, const char * const a
         nWrite = nRead;
         rv = apr_file_write_full(status.current.fd, buf, nWrite, &nWrite);
         if (nWrite != nRead) {
-            char strerrbuf[120];
             apr_off_t cur_offset;
 
             cur_offset = 0;
             if (apr_file_seek(status.current.fd, APR_CUR, &cur_offset) != APR_SUCCESS) {
                 cur_offset = -1;
             }
-            apr_strerror(rv, strerrbuf, sizeof strerrbuf);
             status.nMessCount++;
             apr_snprintf(status.errbuf, sizeof status.errbuf,
                          "Error %d writing to log file at offset %" APR_OFF_T_FMT ". "
-                         "%10d messages lost (%s)\n",
-                         rv, cur_offset, status.nMessCount, strerrbuf);
+                         "%10d messages lost (%pm)\n",
+                         rv, cur_offset, status.nMessCount, &rv);
 
             truncate_and_write_error(&status);
         }