From: Amos Jeffries Date: Tue, 1 Feb 2011 02:20:32 +0000 (-0700) Subject: Author: Francesco Chemolli X-Git-Tag: SQUID_3_1_11~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=10f3deb3a115c0ca0d755426efba4d7a28db7367;p=thirdparty%2Fsquid.git Author: Francesco Chemolli Bug 2868: icc doesn't like string literal in assert checks --- diff --git a/lib/MemPool.cc b/lib/MemPool.cc index 271e6db07e..0b29f2b0b5 100644 --- a/lib/MemPool.cc +++ b/lib/MemPool.cc @@ -430,12 +430,15 @@ MemImplementingAllocator::~MemImplementingAllocator() { MemImplementingAllocator *find_pool, *prev_pool; - assert(MemPools::GetInstance().pools != NULL && "Called MemImplementingAllocator::~MemImplementingAllocator, but no pool exists!"); + /* Abort if the associated pool doesn't exist */ + assert(MemPools::GetInstance().pools != NULL ); /* Pool clean, remove it from List and free */ for (find_pool = MemPools::GetInstance().pools, prev_pool = NULL; (find_pool && this != find_pool); find_pool = find_pool->next) prev_pool = find_pool; - assert(find_pool != NULL && "pool to destroy not found"); + + /* make sure that we found the pool to destroy */ + assert(find_pool != NULL); if (prev_pool) prev_pool->next = next; diff --git a/lib/MemPoolChunked.cc b/lib/MemPoolChunked.cc index aa0786603e..6485b426b6 100644 --- a/lib/MemPoolChunked.cc +++ b/lib/MemPoolChunked.cc @@ -321,7 +321,7 @@ MemPoolChunked::~MemPoolChunked() flushMetersFull(); clean(0); - assert(meter.inuse.level == 0 && "While trying to destroy pool"); + assert(meter.inuse.level == 0); chunk = Chunks; while ( (fchunk = chunk) != NULL) { diff --git a/lib/MemPoolMalloc.cc b/lib/MemPoolMalloc.cc index bca0e9ff43..75759932da 100644 --- a/lib/MemPoolMalloc.cc +++ b/lib/MemPoolMalloc.cc @@ -120,7 +120,7 @@ MemPoolMalloc::MemPoolMalloc(char const *aLabel, size_t aSize) : MemImplementing MemPoolMalloc::~MemPoolMalloc() { - assert(meter.inuse.level == 0 && "While trying to destroy pool"); + assert(meter.inuse.level == 0); clean(0); }