From d854b9d90cd7ee0bf0b718087a31b33b9dbff213 Mon Sep 17 00:00:00 2001
From: Jeff Trawick <trawick@apache.org>
Date: Thu, 19 Nov 2009 20:00:12 +0000
Subject: [PATCH] fix or complain about some invalid errno references

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@882269 13f79535-47bb-0310-9956-ffa450edef68
---
 modules/http/http_filters.c    | 1 -
 modules/proxy/mod_proxy_http.c | 2 +-
 server/log.c                   | 1 +
 support/htcacheclean.c         | 2 +-
 4 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/http/http_filters.c b/modules/http/http_filters.c
index 01ced24944..befb8c6052 100644
--- a/modules/http/http_filters.c
+++ b/modules/http/http_filters.c
@@ -272,7 +272,6 @@ apr_status_t ap_http_filter(ap_filter_t *f, apr_bucket_brigade *b,
             char *endstr;
 
             ctx->state = BODY_LENGTH;
-            errno = 0;
 
             /* Protects against over/underflow, non-digit chars in the
              * string (excluding leading space) (the endstr checks)
diff --git a/modules/proxy/mod_proxy_http.c b/modules/proxy/mod_proxy_http.c
index f9018eb9ea..93a5533832 100644
--- a/modules/proxy/mod_proxy_http.c
+++ b/modules/proxy/mod_proxy_http.c
@@ -1145,7 +1145,7 @@ skip_body:
     }
 
     if (rv != OK) {
-        /* apr_errno value has been logged in lower level method */
+        /* apr_status_t value has been logged in lower level method */
         ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
                      "proxy: pass request body failed to %pI (%s)"
                      " from %s (%s)",
diff --git a/server/log.c b/server/log.c
index 30741f7660..3733797dfd 100644
--- a/server/log.c
+++ b/server/log.c
@@ -494,6 +494,7 @@ int ap_open_logs(apr_pool_t *pconf, apr_pool_t *p /* plog */,
      * because it points to the old error log, or back to the tty
      * of the submitter.
      * XXX: This is BS - /dev/null is non-portable
+     *      errno-as-apr_status_t is also non-portable
      */
     if (replace_stderr && freopen("/dev/null", "w", stderr) == NULL) {
         ap_log_error(APLOG_MARK, APLOG_CRIT, errno, s_main,
diff --git a/support/htcacheclean.c b/support/htcacheclean.c
index 756300be6f..9991a9a496 100644
--- a/support/htcacheclean.c
+++ b/support/htcacheclean.c
@@ -342,7 +342,7 @@ static int process_dir(char *path, apr_pool_t *pool)
             }
         }
 
-        /* this may look strange but apr_stat() may return errno which
+        /* this may look strange but apr_stat() may return an error which
          * is system dependent and there may be transient failures,
          * so just blindly retry for a short while
          */
-- 
2.40.0