]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
DW:
authorwessels <>
Wed, 2 Aug 2000 04:01:29 +0000 (04:01 +0000)
committerwessels <>
Wed, 2 Aug 2000 04:01:29 +0000 (04:01 +0000)
 - Francis A. Vidal reported this assertion with load factors 0.6 and
   0.4.  Alex instructed me that all floating point math is unpredictable
   and we should not use floating point equality comparisons.

src/carp.cc

index 64dabdb4205ee7da5864744e1f80e39ee693e51f..d073fcbf5c75c3439627b04be724cfddb7b046c1 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: carp.cc,v 1.10 2000/07/18 06:16:41 wessels Exp $
+ * $Id: carp.cc,v 1.11 2000/08/01 22:01:29 wessels Exp $
  *
  * DEBUG: section 39    Cache Array Routing Protocol
  * AUTHOR: Eric Stern
@@ -61,7 +61,7 @@ carpInit(void)
      * sum of carp-load-factor's for all cache_peer's in squid.conf
      * must equal 1.0
      */
-    assert(a == 1.0);
+    assert(1000 == (int) (1000.0 * a));
     k = 1;
     P_last = 0;
     p = Config.peers;