From: Christophe Jaillet Date: Tue, 2 Apr 2013 20:20:12 +0000 (+0000) Subject: Use apr_snprintf(... "%pm"...) instead of explicit call to apr_strerror X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=31dda45e5911395f16d70b5adeff981be7ca95f1;p=thirdparty%2Fapache%2Fhttpd.git Use apr_snprintf(... "%pm"...) instead of explicit call to apr_strerror git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1463736 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/support/rotatelogs.c b/support/rotatelogs.c index b4603fb8653..039fdec602c 100644 --- a/support/rotatelogs.c +++ b/support/rotatelogs.c @@ -668,19 +668,17 @@ int main (int argc, const char * const argv[]) 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); }