From 670b31a68a97b261853d2eb992d1622e266c16e9 Mon Sep 17 00:00:00 2001 From: Francesco Chemolli Date: Fri, 2 Jan 2015 14:32:49 +0100 Subject: [PATCH] Removed some never-true assertions clang uncovered several conditionals which could never be true. Removed the conditionals entirely. --- src/comm/Read.cc | 2 +- src/esi/Esi.cc | 2 -- src/log/ModStdio.cc | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) 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); -- 2.47.3