From: Christophe Jaillet Date: Tue, 2 Apr 2013 21:03:25 +0000 (+0000) Subject: Use apr_file_printf(... "%pm"...) instead of explicit call to apr_strerror X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=92791fb61e48b0ba5f893536dda4ec792f5397eb;p=thirdparty%2Fapache%2Fhttpd.git Use apr_file_printf(... "%pm"...) instead of explicit call to apr_strerror git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1463750 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/support/htdigest.c b/support/htdigest.c index 6a0e26f123f..a8b464aedda 100644 --- a/support/htdigest.c +++ b/support/htdigest.c @@ -202,8 +202,8 @@ int main(int argc, const char * const argv[]) #if APR_CHARSET_EBCDIC rv = apr_xlate_open(&to_ascii, "ISO-8859-1", APR_DEFAULT_CHARSET, cntxt); if (rv) { - apr_file_printf(errfile, "apr_xlate_open(): %s (%d)\n", - apr_strerror(rv, line, sizeof(line)), rv); + apr_file_printf(errfile, "apr_xlate_open(): %pm (%d)\n", + &rv, rv); exit(1); } #endif @@ -215,11 +215,8 @@ int main(int argc, const char * const argv[]) rv = apr_file_open(&f, argv[2], APR_WRITE | APR_CREATE, APR_OS_DEFAULT, cntxt); if (rv != APR_SUCCESS) { - char errmsg[120]; - - apr_file_printf(errfile, "Could not open passwd file %s for writing: %s\n", - argv[2], - apr_strerror(rv, errmsg, sizeof errmsg)); + apr_file_printf(errfile, "Could not open passwd file %s for writing: %pm\n", + argv[2], &rv); exit(1); } apr_cpystrn(user, argv[4], sizeof(user));