]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
SourceFormat Enforcement
authorAutomatic source maintenance <squidadm@squid-cache.org>
Tue, 3 Nov 2009 01:12:56 +0000 (18:12 -0700)
committerAutomatic source maintenance <squidadm@squid-cache.org>
Tue, 3 Nov 2009 01:12:56 +0000 (18:12 -0700)
src/HttpReply.cc
src/HttpStatusLine.cc

index b12e144e4ae5fe9c578f182ff115c998957f7738..72b29313d3a4f555b08f4d0f29a56250790dd81a 100644 (file)
@@ -464,8 +464,7 @@ HttpReply::sanityCheckStartLine(MemBuf *buf, const size_t hdr_len, http_status *
     if (strncmp(buf->content(), "ICY", 3) == 0) {
         protoPrefix = "ICY";
         pos = protoPrefix.psize();
-    }
-    else {
+    } else {
 
         if (protoPrefix.cmp(buf->content(), protoPrefix.size()) != 0) {
             debugs(58, 3, "HttpReply::sanityCheckStartLine: missing protocol prefix (" << protoPrefix << ") in '" << buf->content() << "'");
@@ -475,7 +474,7 @@ HttpReply::sanityCheckStartLine(MemBuf *buf, const size_t hdr_len, http_status *
 
         // catch missing or negative status value (negative '-' is not a digit)
         pos = protoPrefix.psize();
+
         // skip arbitrary number of digits and a dot in the verion portion
         while ( pos <= buf->contentSize() && (*(buf->content()+pos) == '.' || xisdigit(*(buf->content()+pos)) ) ) ++pos;
 
index e221d148ff426a3d75679017c54ab69503fbee5e..63e5402064b0c0239e3dbc0d34549b5bcda2a4e0 100644 (file)
@@ -110,8 +110,7 @@ httpStatusLineParse(HttpStatusLine * sline, const String &protoPrefix, const cha
         debugs(57, 3, "httpStatusLineParse: Invalid HTTP identifier. Detected ICY protocol istead.");
         sline->protocol = PROTO_ICY;
         start += protoPrefix.size();
-    }
-    else if (protoPrefix.caseCmp(start, protoPrefix.size()) == 0) {
+    } else if (protoPrefix.caseCmp(start, protoPrefix.size()) == 0) {
 
         start += protoPrefix.size();
 
@@ -121,8 +120,7 @@ httpStatusLineParse(HttpStatusLine * sline, const String &protoPrefix, const cha
         if (sscanf(start, "%d.%d", &sline->version.major, &sline->version.minor) != 2) {
             debugs(57, 7, "httpStatusLineParse: Invalid HTTP identifier.");
         }
-    }
-    else
+    } else
         return 0;
 
     if (!(start = strchr(start, ' ')))