]> granicus.if.org Git - apache/commitdiff
Fix sscanf format spotted by cppcheck.
authorChristophe Jaillet <jailletc36@apache.org>
Sat, 30 Aug 2014 06:51:11 +0000 (06:51 +0000)
committerChristophe Jaillet <jailletc36@apache.org>
Sat, 30 Aug 2014 06:51:11 +0000 (06:51 +0000)
Improve alignment.
Untested.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1621419 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/proxy_util.c
server/protocol.c

index 30cf631623ec22b00d6c66f8286231f0a5173712..5c67144a8328e512fb734ac333a632a16ff9bc8b 100644 (file)
@@ -2589,7 +2589,7 @@ static apr_status_t send_http_connect(proxy_conn_rec *backend,
 
     /* Check for HTTP_OK response status */
     if (status == APR_SUCCESS) {
-        int major, minor;
+        unsigned int major, minor;
         /* Only scan for three character status code */
         char code_str[4];
 
@@ -2607,7 +2607,7 @@ static apr_status_t send_http_connect(proxy_conn_rec *backend,
                 ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, APLOGNO(00950)
                              "send_http_connect: the forward proxy returned code is '%s'",
                              code_str);
-            status = APR_INCOMPLETE;
+                status = APR_INCOMPLETE;
             }
         }
     }
@@ -3529,7 +3529,7 @@ PROXY_DECLARE(int) ap_proxy_create_hdrbrgd(apr_pool_t *p,
 
         /* for sub-requests, ignore freshness/expiry headers */
         if (r->main) {
-            if (    !strcasecmp(headers_in[counter].key, "If-Match")
+            if (   !strcasecmp(headers_in[counter].key, "If-Match")
                 || !strcasecmp(headers_in[counter].key, "If-Modified-Since")
                 || !strcasecmp(headers_in[counter].key, "If-Range")
                 || !strcasecmp(headers_in[counter].key, "If-Unmodified-Since")
index 4bea8d13b3bb364d829aeb26ad93a8435d3c2f67..9e65fe3c28d00541fdb83e22fa3fa6ea00a9d394 100644 (file)
@@ -559,7 +559,7 @@ static int read_request_line(request_rec *r, apr_bucket_brigade *bb)
     const char *uri;
     const char *pro;
 
-    int major = 1, minor = 0;   /* Assume HTTP/1.0 if non-"HTTP" protocol */
+    unsigned int major = 1, minor = 0;   /* Assume HTTP/1.0 if non-"HTTP" protocol */
     char http[5];
     apr_size_t len;
     int num_blank_lines = 0;