]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Removed useless (this==NULL) checks
authorFrancesco Chemolli <kinkie@squid-cache.org>
Fri, 2 Jan 2015 15:38:19 +0000 (16:38 +0100)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Fri, 2 Jan 2015 15:38:19 +0000 (16:38 +0100)
src/comm.cc
src/esi/Esi.cc
src/esi/Include.cc

index 97be9030d5fd3586437e23dca51a5a6775e5abe2..c362d9f437c68a947ba565d77da9f0fe52717498 100644 (file)
@@ -148,7 +148,7 @@ comm_udp_send(int s, const void *buf, size_t len, int flags)
 bool
 comm_has_incomplete_write(int fd)
 {
-    assert(isOpen(fd) && COMMIO_FD_WRITECB(fd));
+    assert(isOpen(fd) && COMMIO_FD_WRITECB(fd) != NULL);
     return COMMIO_FD_WRITECB(fd)->active();
 }
 
index a162aed926e250ad01c80e514b541310137cd9a4..e572518f5a60314e443bc759e9a0aa052b2d75e3 100644 (file)
@@ -1670,7 +1670,6 @@ void
 esiTry::render(ESISegment::Pointer output)
 {
     /* Try renders from it's children */
-    assert (this);
     assert (attempt.getRaw());
     assert (except.getRaw());
     debugs(86, 5, "esiTryRender: Rendering Try " << this);
@@ -1738,7 +1737,6 @@ esiProcessResult_t
 esiTry::process (int dovars)
 {
     esiProcessResult_t rv = ESI_PROCESS_PENDING_MAYFAIL;
-    assert (this);
 
     if (!attempt.getRaw()) {
         debugs(86, DBG_CRITICAL, "esiTryProcess: Try has no attempt element - ESI template is invalid (section 3.4)");
index c87564c4d8aa46215326cdd096f3e113cb4d9a38..ae8edfc7b3b5d8a59244e65bd5c688224ab39755 100644 (file)
@@ -198,7 +198,6 @@ esiBufferRecipient (clientStreamNode *node, ClientHttpRequest *http, HttpReply *
 /* esiStream functions */
 ESIStreamContext::~ESIStreamContext()
 {
-    assert (this);
     freeResources();
 }
 
@@ -453,8 +452,6 @@ ESIInclude::dataNeeded() const
 void
 ESIInclude::subRequestDone (ESIStreamContext::Pointer stream, bool success)
 {
-    assert (this);
-
     if (!dataNeeded())
         return;