You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by wr...@apache.org on 2001/04/12 15:35:39 UTC

cvs commit: httpd-2.0/modules/aaa mod_access.c

wrowe       01/04/12 06:35:39

  Modified:    modules/aaa mod_access.c
  Log:
    More APR_STATUS_IS_ canonicalization
  
  Revision  Changes    Path
  1.32      +5 -6      httpd-2.0/modules/aaa/mod_access.c
  
  Index: mod_access.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/aaa/mod_access.c,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- mod_access.c	2001/03/15 22:09:27	1.31
  +++ mod_access.c	2001/04/12 13:35:39	1.32
  @@ -175,18 +175,17 @@
       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);