From: Francesco Chemolli Date: Fri, 2 Jan 2015 13:32:49 +0000 (+0100) Subject: Removed some never-true assertions X-Git-Tag: merge-candidate-3-v1~389 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=670b31a68a97b261853d2eb992d1622e266c16e9;p=thirdparty%2Fsquid.git Removed some never-true assertions clang uncovered several conditionals which could never be true. Removed the conditionals entirely. --- diff --git a/src/comm/Read.cc b/src/comm/Read.cc index 0d68230e94..38ef16749b 100644 --- a/src/comm/Read.cc +++ b/src/comm/Read.cc @@ -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 diff --git a/src/esi/Esi.cc b/src/esi/Esi.cc index 6f2dbbd22c..a162aed926 100644 --- a/src/esi/Esi.cc +++ b/src/esi/Esi.cc @@ -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; diff --git a/src/log/ModStdio.cc b/src/log/ModStdio.cc index 44e5f07d0c..423c69a77f 100644 --- a/src/log/ModStdio.cc +++ b/src/log/ModStdio.cc @@ -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);