]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Optimization in HttpHdrCc::packInto : if there is nothing to fill in don't even look
authorFrancesco Chemolli <kinkie@squid-cache.org>
Mon, 3 Oct 2011 15:44:56 +0000 (17:44 +0200)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Mon, 3 Oct 2011 15:44:56 +0000 (17:44 +0200)
src/HttpHdrCc.cc

index 74a86f1247ff0856db98c5c72c557f8ec12c427b..1df1278dae68a8f8ab8fff7bfbec68df0ca36bad 100644 (file)
@@ -216,6 +216,10 @@ HttpHdrCc::parse(const String & str)
 void
 HttpHdrCc::packInto(Packer * p) const
 {
+    // optimization: if the mask is empty do nothing
+    if (mask==0)
+        return;
+
     http_hdr_cc_type flag;
     int pcount = 0;
     assert(p);