]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
C++-refactored HttpHdrCcDestroy. Object can now be safely deleted.
authorFrancesco Chemolli <kinkie@squid-cache.org>
Mon, 12 Sep 2011 17:45:26 +0000 (19:45 +0200)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Mon, 12 Sep 2011 17:45:26 +0000 (19:45 +0200)
src/HttpHeaderCacheControl.cc
src/HttpReply.cc
src/HttpRequest.cc
src/http.cc
src/protos.h

index 07e0c8fea6d68c7ae05d5470096fffab8863eec4..f55662a3e0d075828d18dd5b689d7d6972a7774e 100644 (file)
@@ -208,13 +208,6 @@ HttpHdrCc::parseInit(const String & str)
     return (mask != 0);
 }
 
-void
-httpHdrCcDestroy(HttpHdrCc * cc)
-{
-    assert(cc);
-    delete cc;
-}
-
 void
 httpHdrCcPackInto(const HttpHdrCc * cc, Packer * p)
 {
index f5124f454d51425c8b094f683cf65186a19bd2ba..75bd6849990cfbc873691a1e04ef1a466e67227d 100644 (file)
@@ -402,7 +402,7 @@ HttpReply::hdrCacheClean()
     content_type.clean();
 
     if (cache_control) {
-        httpHdrCcDestroy(cache_control);
+        delete cache_control;
         cache_control = NULL;
     }
 
index 3448d47b9818e578cffeb5dfbed3657c379c003b..258acdc4e66a8333878d5406346baa8fb0a9c178 100644 (file)
@@ -145,7 +145,7 @@ HttpRequest::clean()
     header.clean();
 
     if (cache_control) {
-        httpHdrCcDestroy(cache_control);
+        delete cache_control;
         cache_control = NULL;
     }
 
index 6acb0e6e3747688a6dcf22276c13c92186bd2421..adb50265c5587d2102a81abb3d23e4df73f74f9a 100644 (file)
@@ -1780,7 +1780,7 @@ HttpStateData::httpBuildRequestHeader(HttpRequest * request,
 
         hdr_out->putCc(cc);
 
-        httpHdrCcDestroy(cc);
+        delete cc;
     }
 
     /* maybe append Connection: keep-alive */
index 189d3cd704307fd451d8ced5f3bf3083eec6cc53..fedbee83549501c38d820051a266950bd0131fd4 100644 (file)
@@ -237,7 +237,6 @@ SQUIDCEXTERN void httpBodyPackInto(const HttpBody * body, Packer * p);
 /* Http Cache Control Header Field */
 SQUIDCEXTERN void httpHdrCcInitModule(void);
 SQUIDCEXTERN void httpHdrCcCleanModule(void);
-SQUIDCEXTERN void httpHdrCcDestroy(HttpHdrCc * cc);
 SQUIDCEXTERN HttpHdrCc *httpHdrCcDup(const HttpHdrCc * cc);
 SQUIDCEXTERN void httpHdrCcPackInto(const HttpHdrCc * cc, Packer * p);
 SQUIDCEXTERN void httpHdrCcSetMaxAge(HttpHdrCc * cc, int max_age);