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-Tag: 2.5.0-alpha~5626 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ae8de8d48c4bf488c583d97ff5ea4bab9eb4933d;p=apache 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 6a0e26f123..a8b464aedd 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));