summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam A. Rowe Jr <wrowe@apache.org>2001-04-12 13:37:23 +0000
committerWilliam A. Rowe Jr <wrowe@apache.org>2001-04-12 13:37:23 +0000
commitb9d020553f15fdf11fd9a2b02c81f61a96203424 (patch)
treec8c852d9f24d753567e022475f87f2ab8ecebac6
parent18c79112fa70315dd7bc17627e044884bea86d57 (diff)
downloadhttpd-b9d020553f15fdf11fd9a2b02c81f61a96203424.tar.gz
More APR_STATUS_IS_ canonicalization
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88825 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--modules/aaa/mod_access.c11
-rw-r--r--server/mpm/prefork/prefork.c2
2 files changed, 6 insertions, 7 deletions
diff --git a/modules/aaa/mod_access.c b/modules/aaa/mod_access.c
index ac9f275cbe..d51df93a40 100644
--- a/modules/aaa/mod_access.c
+++ b/modules/aaa/mod_access.c
@@ -175,18 +175,17 @@ static const char *allow_cmd(cmd_parms *cmd, void *dv, const char *from,
else if ((s = strchr(where, '/'))) {
*s++ = '\0';
rv = apr_ipsubnet_create(&a->x.ip, where, s, cmd->pool);
- switch(rv) {
- case APR_SUCCESS:
- break;
- case APR_EINVAL: /* looked nothing like an IP address */
+ if(APR_STATUS_IS_EINVAL(rv)) {
+ /* looked nothing like an IP address */
return "An IP address was expected";
- default:
+ }
+ else if (rv != APR_SUCCESS) {
apr_strerror(rv, msgbuf, sizeof msgbuf);
return apr_pstrdup(cmd->pool, msgbuf);
}
a->type = T_IP;
}
- else if ((rv = apr_ipsubnet_create(&a->x.ip, where, NULL, cmd->pool)) != APR_EINVAL) {
+ else if (!APR_STATUS_IS_EINVAL(rv = apr_ipsubnet_create(&a->x.ip, where, NULL, cmd->pool))) {
if (rv != APR_SUCCESS) {
apr_strerror(rv, msgbuf, sizeof msgbuf);
return apr_pstrdup(cmd->pool, msgbuf);
diff --git a/server/mpm/prefork/prefork.c b/server/mpm/prefork/prefork.c
index 2546570d3b..b6f6696ad9 100644
--- a/server/mpm/prefork/prefork.c
+++ b/server/mpm/prefork/prefork.c
@@ -660,7 +660,7 @@ static void child_main(int child_num_arg)
clean_child_exit(0);
}
stat = apr_accept(&csd, sd, ptrans);
- if (stat == APR_SUCCESS || stat != APR_EINTR)
+ if (stat == APR_SUCCESS || !APR_STATUS_IS_EINTR(stat))
break;
}