Axe some redundant conditions. PR 62549.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1837941 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yann Ylavic
2018-08-13 12:54:30 +00:00
parent 4176ecb142
commit a920a90838
6 changed files with 12 additions and 12 deletions

View File

@ -711,7 +711,7 @@ int cache_check_freshness(cache_handle_t *h, cache_request_rec *cache,
(apr_time_sec(info->expire - info->date)) > age))) {
/* make sure we don't stomp on a previous warning */
if ((warn_head == NULL) ||
((warn_head != NULL) && (ap_strstr_c(warn_head, "110") == NULL))) {
(ap_strstr_c(warn_head, "110") == NULL)) {
apr_table_mergen(h->resp_hdrs, "Warning",
"110 Response is stale");
}
@ -730,7 +730,7 @@ int cache_check_freshness(cache_handle_t *h, cache_request_rec *cache,
* the new warning to the correct *headers_out location.
*/
if ((warn_head == NULL) ||
((warn_head != NULL) && (ap_strstr_c(warn_head, "113") == NULL))) {
(ap_strstr_c(warn_head, "113") == NULL)) {
apr_table_mergen(h->resp_hdrs, "Warning",
"113 Heuristic expiration");
}
@ -787,7 +787,7 @@ int cache_check_freshness(cache_handle_t *h, cache_request_rec *cache,
/* make sure we don't stomp on a previous warning */
warn_head = apr_table_get(h->resp_hdrs, "Warning");
if ((warn_head == NULL) ||
((warn_head != NULL) && (ap_strstr_c(warn_head, "110") == NULL))) {
(ap_strstr_c(warn_head, "110") == NULL)) {
apr_table_mergen(h->resp_hdrs, "Warning",
"110 Response is stale");
}

View File

@ -909,8 +909,8 @@ static apr_status_t cache_save_filter(ap_filter_t *f, apr_bucket_brigade *in)
/* add a revalidation warning */
warn_head = apr_table_get(r->err_headers_out, "Warning");
if ((warn_head == NULL) || ((warn_head != NULL)
&& (ap_strstr_c(warn_head, "111") == NULL))) {
if ((warn_head == NULL) ||
(ap_strstr_c(warn_head, "111") == NULL)) {
apr_table_mergen(r->err_headers_out, "Warning",
"111 Revalidation failed");
}
@ -1901,8 +1901,8 @@ static void cache_insert_error_filter(request_rec *r)
/* add a revalidation warning */
warn_head = apr_table_get(r->err_headers_out, "Warning");
if ((warn_head == NULL) || ((warn_head != NULL)
&& (ap_strstr_c(warn_head, "111") == NULL))) {
if ((warn_head == NULL)
|| ap_strstr_c(warn_head, "111") == NULL) {
apr_table_mergen(r->err_headers_out, "Warning",
"111 Revalidation failed");
}