]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Portability fix: icc doesn't like string literal in assert checks
authorFrancesco Chemolli <kinkie@squid-cache.org>
Tue, 25 Jan 2011 22:46:53 +0000 (23:46 +0100)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Tue, 25 Jan 2011 22:46:53 +0000 (23:46 +0100)
lib/MemPool.cc
lib/MemPoolChunked.cc
lib/MemPoolMalloc.cc

index fd58d41bf8ab3f01a742e9e1b4a8bda58d272888..3e6143af90cd257efb9a9f930c54c4c4282f8b78 100644 (file)
@@ -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;
index aa0786603ed57a638134707f06dbee0e52e60bed..6485b426b66dda0dcb75d91168022581567f6163 100644 (file)
@@ -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) {
index bca0e9ff432517be77ad7c8e2508fdff30f28848..75759932da2550c99ff35e3edd9aca4aeb8ce487 100644 (file)
@@ -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);
 }