summaryrefslogtreecommitdiffstats
path: root/modules/metadata
diff options
context:
space:
mode:
authorStefan Fritsch <sf@apache.org>2013-03-31 23:29:28 +0200
committerStefan Fritsch <sf@apache.org>2013-03-31 23:29:28 +0200
commite00688ffd945257f24f92e5465f63ac7efa4a435 (patch)
tree12191b3bc6ec616e0394ec0ccf736ee96139250d /modules/metadata
parentuse ap_log_error's facility to print the apr error string instead of (diff)
downloadapache2-e00688ffd945257f24f92e5465f63ac7efa4a435.tar.xz
apache2-e00688ffd945257f24f92e5465f63ac7efa4a435.zip
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 'modules/metadata')
-rw-r--r--modules/metadata/mod_remoteip.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/modules/metadata/mod_remoteip.c b/modules/metadata/mod_remoteip.c
index a0bfd8644f..79aa6a940a 100644
--- a/modules/metadata/mod_remoteip.c
+++ b/modules/metadata/mod_remoteip.c
@@ -170,10 +170,9 @@ static const char *proxies_set(cmd_parms *cmd, void *cfg,
}
if (rv != APR_SUCCESS) {
- char msgbuf[128];
- apr_strerror(rv, msgbuf, sizeof(msgbuf));
- return apr_pstrcat(cmd->pool, "RemoteIP: Error parsing IP ", arg,
- " (", msgbuf, " error) for ", cmd->cmd->name, NULL);
+ return apr_psprintf(cmd->pool,
+ "RemoteIP: Error parsing IP %s (%pm error) for %s",
+ arg, &rv, cmd->cmd->name);
}
return NULL;
@@ -192,9 +191,8 @@ static const char *proxylist_read(cmd_parms *cmd, void *cfg,
filename = ap_server_root_relative(cmd->temp_pool, filename);
rv = ap_pcfg_openfile(&cfp, cmd->temp_pool, filename);
if (rv != APR_SUCCESS) {
- return apr_psprintf(cmd->pool, "%s: Could not open file %s: %s",
- cmd->cmd->name, filename,
- apr_strerror(rv, lbuf, sizeof(lbuf)));
+ return apr_psprintf(cmd->pool, "%s: Could not open file %s: %pm",
+ cmd->cmd->name, filename, &rv);
}
while (!(ap_cfg_getline(lbuf, MAX_STRING_LEN, cfp))) {