]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Removed some never-true assertions
authorFrancesco Chemolli <kinkie@squid-cache.org>
Fri, 2 Jan 2015 13:32:49 +0000 (14:32 +0100)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Fri, 2 Jan 2015 13:32:49 +0000 (14:32 +0100)
clang uncovered several conditionals which could never be true.
Removed the conditionals entirely.

src/comm/Read.cc
src/esi/Esi.cc
src/log/ModStdio.cc

index 0d68230e94a6c4894d23b6622fb81992ee9e51ba..38ef16749b4287cc4ed993d03c3cb7a1657a2e76 100644 (file)
@@ -28,7 +28,7 @@
 bool
 Comm::MonitorsRead(int fd)
 {
-    assert(isOpen(fd) && COMMIO_FD_READCB(fd));
+    assert(isOpen(fd) && COMMIO_FD_READCB(fd) != NULL);
     // Being active is usually the same as monitoring because we always
     // start monitoring the FD when we configure Comm::IoCallback for I/O
     // and we usually configure Comm::IoCallback for I/O when we starting
index 6f2dbbd22c66da4ac99f1518827c23f4e64e5b73..a162aed926e250ad01c80e514b541310137cd9a4 100644 (file)
@@ -302,8 +302,6 @@ ESIContext::fixupOutboundTail()
 esiKick_t
 ESIContext::kick ()
 {
-    assert (this);
-
     if (flags.kicked) {
         debugs(86, 5, "esiKick: Re-entered whilst in progress");
         // return ESI_KICK_INPROGRESS;
index 44e5f07d0c3bf2e7b3f1f3067724655a2f6cfbc0..423c69a77fb4d5d80bf7d39626bd9cfa0e6e2bda 100644 (file)
@@ -109,7 +109,6 @@ logfile_mod_stdio_rotate(Logfile * lf)
     char from[MAXPATHLEN];
     char to[MAXPATHLEN];
     l_stdio_t *ll = (l_stdio_t *) lf->data;
-    assert(lf->path);
     const char *realpath = lf->path+6; // skip 'stdio:' prefix.
     assert(realpath);