You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by yl...@apache.org on 2018/08/13 12:54:30 UTC
svn commit: r1837941 - in /httpd/httpd/trunk: modules/cache/cache_util.c
modules/cache/mod_cache.c modules/filters/mod_ext_filter.c
server/mpm/netware/mpm_netware.c server/util.c server/util_filter.c
Author: ylavic
Date: Mon Aug 13 12:54:30 2018
New Revision: 1837941
URL: http://svn.apache.org/viewvc?rev=1837941&view=rev
Log:
Axe some redundant conditions. PR 62549.
Modified:
httpd/httpd/trunk/modules/cache/cache_util.c
httpd/httpd/trunk/modules/cache/mod_cache.c
httpd/httpd/trunk/modules/filters/mod_ext_filter.c
httpd/httpd/trunk/server/mpm/netware/mpm_netware.c
httpd/httpd/trunk/server/util.c
httpd/httpd/trunk/server/util_filter.c
Modified: httpd/httpd/trunk/modules/cache/cache_util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/cache_util.c?rev=1837941&r1=1837940&r2=1837941&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/cache/cache_util.c (original)
+++ httpd/httpd/trunk/modules/cache/cache_util.c Mon Aug 13 12:54:30 2018
@@ -711,7 +711,7 @@ int cache_check_freshness(cache_handle_t
(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
* 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
/* 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");
}
Modified: httpd/httpd/trunk/modules/cache/mod_cache.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/cache/mod_cache.c?rev=1837941&r1=1837940&r2=1837941&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/cache/mod_cache.c (original)
+++ httpd/httpd/trunk/modules/cache/mod_cache.c Mon Aug 13 12:54:30 2018
@@ -909,8 +909,8 @@ static apr_status_t cache_save_filter(ap
/* 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(re
/* 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");
}
Modified: httpd/httpd/trunk/modules/filters/mod_ext_filter.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/filters/mod_ext_filter.c?rev=1837941&r1=1837940&r2=1837941&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/filters/mod_ext_filter.c (original)
+++ httpd/httpd/trunk/modules/filters/mod_ext_filter.c Mon Aug 13 12:54:30 2018
@@ -161,7 +161,7 @@ static const char *parse_cmd(apr_pool_t
++*args; /* move past leading " */
/* find true end of args string (accounting for escaped quotes) */
- while (**args && (**args != '"' || (**args == '"' && escaping))) {
+ while (**args && (**args != '"' || escaping)) {
if (escaping) {
escaping = 0;
}
Modified: httpd/httpd/trunk/server/mpm/netware/mpm_netware.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/mpm/netware/mpm_netware.c?rev=1837941&r1=1837940&r2=1837941&view=diff
==============================================================================
--- httpd/httpd/trunk/server/mpm/netware/mpm_netware.c (original)
+++ httpd/httpd/trunk/server/mpm/netware/mpm_netware.c Mon Aug 13 12:54:30 2018
@@ -1205,8 +1205,8 @@ static int CommandLineInterpreter(scr_t
/* If we got an instance id but it doesn't match this
instance of the nlm, pass it on. */
if (pID) {
- pID = &pID[2];
- while (*pID && (*pID == ' '))
+ pID += 2;
+ while (*pID == ' ')
pID++;
}
if (pID && ap_my_addrspace && strnicmp(pID, ap_my_addrspace, strlen(ap_my_addrspace)))
Modified: httpd/httpd/trunk/server/util.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/util.c?rev=1837941&r1=1837940&r2=1837941&view=diff
==============================================================================
--- httpd/httpd/trunk/server/util.c (original)
+++ httpd/httpd/trunk/server/util.c Mon Aug 13 12:54:30 2018
@@ -851,7 +851,7 @@ AP_DECLARE(char *) ap_getword_conf2(apr_
break;
if (*strend == '{')
++count;
- if (*strend == '\\' && strend[1] && strend[1] == '\\') {
+ if (*strend == '\\' && strend[1] == '\\') {
++strend;
}
++strend;
Modified: httpd/httpd/trunk/server/util_filter.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/util_filter.c?rev=1837941&r1=1837940&r2=1837941&view=diff
==============================================================================
--- httpd/httpd/trunk/server/util_filter.c (original)
+++ httpd/httpd/trunk/server/util_filter.c Mon Aug 13 12:54:30 2018
@@ -824,7 +824,7 @@ AP_DECLARE(apr_status_t) ap_filter_reins
(APR_BRIGADE_EMPTY(bb) ? "empty" : "full"),
f->frec->name);
- if (f->bb && !APR_BRIGADE_EMPTY(f->bb)) {
+ if (f->bb) {
APR_BRIGADE_PREPEND(bb, f->bb);
}
if (!flush_upto) {