]> granicus.if.org Git - apache/commitdiff
Merge r1452128 from trunk:
authorJim Jagielski <jim@apache.org>
Mon, 15 Apr 2013 12:42:00 +0000 (12:42 +0000)
committerJim Jagielski <jim@apache.org>
Mon, 15 Apr 2013 12:42:00 +0000 (12:42 +0000)
Remove useless tests.

Turn
   if (*x && apr_isspace(*x))
into
   if (apr_isspace(*x))
Submitted by: jailletc36
Reviewed/backported by: jim

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1467980 13f79535-47bb-0310-9956-ffa450edef68

STATUS
modules/cache/mod_cache_disk.c
modules/filters/mod_proxy_html.c
modules/mappers/mod_imagemap.c
modules/mappers/mod_negotiation.c
modules/mappers/mod_rewrite.c
modules/metadata/mod_cern_meta.c
modules/metadata/mod_headers.c
server/util.c
server/util_script.c
support/httxt2dbm.c

diff --git a/STATUS b/STATUS
index 1f7213f47ac971402f5c9a56d2465367cc7382eb..aba7423054de2b09eca122b7be11b5b75b4570bc 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -90,11 +90,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-   * remove useless tests ==> (*x && apr_isspace(*x))
-     trunk patch: http://svn.apache.org/viewvc?view=revision&revision=1452128
-     2.4.x patch: trunk patch works (with some offset)
-     +1: jailletc36, rjung, covener
-
    * mod_log_config: Fix crash when logging request end time for a failed request.
      PR 54828
      trunk patch: http://svn.apache.org/r1467765
index 843921e797a829d3a3c51e5b67bbe5f8f63ffe2d..670e4b8d0ceb89315332ed8b6f9199f0c4cd4f09 100644 (file)
@@ -841,7 +841,7 @@ static apr_status_t read_table(cache_handle_t *handle, request_rec *r,
         }
 
         *l++ = '\0';
-        while (*l && apr_isspace(*l)) {
+        while (apr_isspace(*l)) {
             ++l;
         }
 
index 6cbe87a96882c004cb3c01ad6b35cd594f13a2e8..59e5ed3e025ebc37085b6ccef50d620195c821c0 100644 (file)
@@ -668,7 +668,7 @@ static meta *metafix(request_rec *r, const char *buf)
             if (p != NULL) {
                 while (*p) {
                     p += 7;
-                    while (*p && apr_isspace(*p))
+                    while (apr_isspace(*p))
                         ++p;
                     if (*p != '=')
                         continue;
index 1857760b37ea3f08b9ca09e33de41b0ea1d48b00..65b9eb15d2aaa4874e7b7567c65767356cb4dae5 100644 (file)
@@ -686,7 +686,7 @@ static int imap_handler_internal(request_rec *r)
         if (!*string_pos) {   /* need at least two fields */
             goto need_2_fields;
         }
-        while(*string_pos && apr_isspace(*string_pos)) { /* past whitespace */
+        while (apr_isspace(*string_pos)) { /* past whitespace */
             ++string_pos;
         }
 
index 4a3a45730eeb70be23bb2ae067a44fd47af45c34..5ec0d4d02de4d2257d8f79df5d7d82af1741ddbf 100644 (file)
@@ -366,7 +366,7 @@ static float atoq(const char *string)
         return  1.0f;
     }
 
-    while (*string && apr_isspace(*string)) {
+    while (apr_isspace(*string)) {
         ++string;
     }
 
@@ -464,7 +464,7 @@ static const char *get_entry(apr_pool_t *p, accept_rec *result,
         }
 
         *cp++ = '\0';           /* Delimit var */
-        while (*cp && (apr_isspace(*cp) || *cp == '=')) {
+        while (apr_isspace(*cp) || *cp == '=') {
             ++cp;
         }
 
@@ -757,7 +757,7 @@ static enum header_state get_header_line(char *buffer, int len, apr_file_t *map)
 
     /* If blank, just return it --- this ends information on this variant */
 
-    for (cp = buffer; (*cp && apr_isspace(*cp)); ++cp) {
+    for (cp = buffer; apr_isspace(*cp); ++cp) {
         continue;
     }
 
@@ -924,7 +924,7 @@ static char *lcase_header_name_return_body(char *header, request_rec *r)
 
     do {
         ++cp;
-    } while (*cp && apr_isspace(*cp));
+    } while (apr_isspace(*cp));
 
     if (!*cp) {
         ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(00682)
index 4fa90546c1ed2ffa207f069a8782bf703a9cae28..a7ac2134b84702ae4134dd7188527fb5014e9724 100644 (file)
@@ -1255,7 +1255,7 @@ static char *lookup_map_txtfile(request_rec *r, const char *file, char *key)
         }
 
         /* jump to the value */
-        while (*p && apr_isspace(*p)) {
+        while (apr_isspace(*p)) {
             ++p;
         }
 
index fe704f1a12dcdc89a3e239b4d6ffcb3c15659b65..f06c464c1d9d9e0570f585abeac07c4c8cb90813 100644 (file)
@@ -237,7 +237,7 @@ static int scan_meta_file(request_rec *r, apr_file_t *f)
         }
 
         *l++ = '\0';
-        while (*l && apr_isspace(*l))
+        while (apr_isspace(*l))
             ++l;
 
         if (!strcasecmp(w, "Content-type")) {
index 93977390b956e4642094049b9e27b3e639a22a44..9ce2fdec67f2f5da81390869371d3478e5194c18 100644 (file)
@@ -722,7 +722,7 @@ static int do_headers_fixup(request_rec *r, apr_table_t *headers,
                 while (*val) {
                     const char *tok_start;
 
-                    while (*val && apr_isspace(*val))
+                    while (apr_isspace(*val))
                         ++val;
 
                     tok_start = val;
index 1d8359fcb751e29b6654f64edc20318b3950d750..87a7f29ce6128235ad4ebf952c12f5375aa0721f 100644 (file)
@@ -783,7 +783,7 @@ AP_DECLARE(char *) ap_getword_conf(apr_pool_t *p, const char **line)
     char *res;
     char quote;
 
-    while (*str && apr_isspace(*str))
+    while (apr_isspace(*str))
         ++str;
 
     if (!*str) {
@@ -815,7 +815,7 @@ AP_DECLARE(char *) ap_getword_conf(apr_pool_t *p, const char **line)
         res = substring_conf(p, str, strend - str, 0);
     }
 
-    while (*strend && apr_isspace(*strend))
+    while (apr_isspace(*strend))
         ++strend;
     *line = strend;
     return res;
@@ -1405,7 +1405,7 @@ AP_DECLARE(char *) ap_get_token(apr_pool_t *p, const char **accept_line,
 
     /* Find first non-white byte */
 
-    while (*ptr && apr_isspace(*ptr))
+    while (apr_isspace(*ptr))
         ++ptr;
 
     tok_start = ptr;
@@ -1427,7 +1427,7 @@ AP_DECLARE(char *) ap_get_token(apr_pool_t *p, const char **accept_line,
 
     /* Advance accept_line pointer to the next non-white byte */
 
-    while (*ptr && apr_isspace(*ptr))
+    while (apr_isspace(*ptr))
         ++ptr;
 
     *accept_line = ptr;
index 5708c0860255d5103b517b4bd6c144a24b968110..12a056f542eb9833e336adf43933bb9bac2adf0a 100644 (file)
@@ -565,7 +565,7 @@ AP_DECLARE(int) ap_scan_script_header_err_core_ex(request_rec *r, char *buffer,
         }
 
         *l++ = '\0';
-        while (*l && apr_isspace(*l)) {
+        while (apr_isspace(*l)) {
             ++l;
         }
 
index 26d8257f84ba8d979891df59a39bd5d421f42d32..387418bb96b7fd6e8ea27ff102897c6afa59c100 100644 (file)
@@ -137,7 +137,7 @@ static apr_status_t to_dbm(apr_dbm_t *dbm, apr_file_t *fp, apr_pool_t *pool)
         dbmkey.dptr = apr_pstrmemdup(p, line,  c - line);
         dbmkey.dsize = (c - line);
 
-        while (*c && apr_isspace(*c)) {
+        while (apr_isspace(*c)) {
             ++c;
         }