diff options
author | Christophe Jaillet <jailletc36@apache.org> | 2022-01-20 22:22:04 +0100 |
---|---|---|
committer | Christophe Jaillet <jailletc36@apache.org> | 2022-01-20 22:22:04 +0100 |
commit | 84aceb715b639cfda7e078b799baf6b0f18cf451 (patch) | |
tree | ed42e5661899941dcfd2f1f4fa84aaea826fcf86 | |
parent | mod_unixd: Make CoreDumpDirectory work for FreeBSD 11+. PR 65819. (diff) | |
download | apache2-84aceb715b639cfda7e078b799baf6b0f18cf451.tar.xz apache2-84aceb715b639cfda7e078b799baf6b0f18cf451.zip |
The format specifier is APR_SIZE_T_FMT, so there is no point in trying to log -1 if apr_file_read() fails, because size_t is unsigned.
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
-rw-r--r-- | modules/filters/mod_ext_filter.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/modules/filters/mod_ext_filter.c b/modules/filters/mod_ext_filter.c index 085371a163..cb987c3aa5 100644 --- a/modules/filters/mod_ext_filter.c +++ b/modules/filters/mod_ext_filter.c @@ -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 */ |