]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
The format specifier is APR_SIZE_T_FMT, so there is no point in trying to log -1...
authorChristophe Jaillet <jailletc36@apache.org>
Thu, 20 Jan 2022 21:22:04 +0000 (21:22 +0000)
committerChristophe Jaillet <jailletc36@apache.org>
Thu, 20 Jan 2022 21:22:04 +0000 (21:22 +0000)
It is more straighforward to log the real value returned by apr_file_read() in such a case. The error code is also logged anyway.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1897270 13f79535-47bb-0310-9956-ffa450edef68

modules/filters/mod_ext_filter.c

index 085371a1635a7f632959b07501b79c246fab8666..cb987c3aa5d95b4eb4ed3fb22d5698f100270262 100644 (file)
@@ -655,8 +655,7 @@ static apr_status_t drain_available_output(ap_filter_t *f,
         if (rv && !APR_STATUS_IS_EAGAIN(rv))
            lvl = APLOG_DEBUG;
         ap_log_rerror(APLOG_MARK, lvl, rv, r, APLOGNO(01460)
-                      "apr_file_read(child output), len %" APR_SIZE_T_FMT,
-                      !rv ? len : -1);
+                      "apr_file_read(child output), len %" APR_SIZE_T_FMT, len);
         if (rv != APR_SUCCESS) {
             return rv;
         }
@@ -810,8 +809,7 @@ static int ef_unified_filter(ap_filter_t *f, apr_bucket_brigade *bb)
         if (rv && !APR_STATUS_IS_EOF(rv) && !APR_STATUS_IS_EAGAIN(rv))
             lvl = APLOG_ERR;
         ap_log_rerror(APLOG_MARK, lvl, rv, r, APLOGNO(01466)
-                      "apr_file_read(child output), len %" APR_SIZE_T_FMT,
-                      !rv ? len : -1);
+                      "apr_file_read(child output), len %" APR_SIZE_T_FMT, len);
         if (APR_STATUS_IS_EAGAIN(rv)) {
             if (eos) {
                 /* should not occur, because we have an APR timeout in place */