diff options
author | Stefan Fritsch <sf@apache.org> | 2013-03-31 21:29:28 +0000 |
---|---|---|
committer | Stefan Fritsch <sf@apache.org> | 2013-03-31 21:29:28 +0000 |
commit | e00688ffd945257f24f92e5465f63ac7efa4a435 (patch) | |
tree | 12191b3bc6ec616e0394ec0ccf736ee96139250d /server/config.c | |
parent | a68ec08398a2cba5d56af20ef1f1d1b5243f0be6 (diff) | |
download | httpd-e00688ffd945257f24f92e5465f63ac7efa4a435.tar.gz |
Use %pm available since apr 1.3 instead of an extra call to apr_strerror
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1463056 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server/config.c')
-rw-r--r-- | server/config.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/server/config.c b/server/config.c index 733d9c285f..465ebf2207 100644 --- a/server/config.c +++ b/server/config.c @@ -1802,9 +1802,8 @@ AP_DECLARE(const char *) ap_process_resource_config(server_rec *s, rv = ap_pcfg_openfile(&cfp, p, fname); if (rv != APR_SUCCESS) { - char errmsg[120]; - return apr_psprintf(p, "Could not open configuration file %s: %s", - fname, apr_strerror(rv, errmsg, sizeof errmsg)); + return apr_psprintf(p, "Could not open configuration file %s: %pm", + fname, &rv); } parms.config_file = cfp; @@ -1859,9 +1858,8 @@ static const char *process_resource_config_nofnmatch(server_rec *s, */ rv = apr_dir_open(&dirp, path, ptemp); if (rv != APR_SUCCESS) { - char errmsg[120]; - return apr_psprintf(p, "Could not open config directory %s: %s", - path, apr_strerror(rv, errmsg, sizeof errmsg)); + return apr_psprintf(p, "Could not open config directory %s: %pm", + path, &rv); } candidates = apr_array_make(ptemp, 1, sizeof(fnames)); @@ -1946,9 +1944,8 @@ static const char *process_resource_config_fnmatch(server_rec *s, */ rv = apr_dir_open(&dirp, path, ptemp); if (rv != APR_SUCCESS) { - char errmsg[120]; - return apr_psprintf(p, "Could not open config directory %s: %s", - path, apr_strerror(rv, errmsg, sizeof errmsg)); + return apr_psprintf(p, "Could not open config directory %s: %pm", + path, &rv); } candidates = apr_array_make(ptemp, 1, sizeof(fnames)); |