Commit 61230292 authored by Yann Ylavic's avatar Yann Ylavic
Browse files

Axe some redundant conditions. PR 62549.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1837941 13f79535-47bb-0310-9956-ffa450edef68
parent 8b36b0f2
Loading
Loading
Loading
Loading
+3 −3
Changes for modules/cache/cache_util.c: 3 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -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");
        }
+4 −4
Changes for modules/cache/mod_cache.c: 4 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -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");
            }
+1 −1
Changes for modules/filters/mod_ext_filter.c: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -161,7 +161,7 @@ static const char *parse_cmd(apr_pool_t *p, const char **args, ef_filter_t *filt

        ++*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;
            }
+2 −2
Changes for server/mpm/netware/mpm_netware.c: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -1205,8 +1205,8 @@ static int CommandLineInterpreter(scr_t screenID, const char *commandLine)
        /* 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)))
+1 −1
Changes for server/util.c: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -851,7 +851,7 @@ AP_DECLARE(char *) ap_getword_conf2(apr_pool_t *p, const char **line)
                break;
            if (*strend == '{')
                ++count;
            if (*strend == '\\' && strend[1] && strend[1] == '\\') {
            if (*strend == '\\' && strend[1] == '\\') {
                ++strend;
            }
            ++strend;
Loading