From ad590e13a47ad9cde1f40f7576d8bb5c2ab489ae Mon Sep 17 00:00:00 2001 From: wessels <> Date: Wed, 2 Aug 2000 04:01:29 +0000 Subject: [PATCH] DW: - 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/carp.cc b/src/carp.cc index 64dabdb420..d073fcbf5c 100644 --- a/src/carp.cc +++ b/src/carp.cc @@ -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; -- 2.47.3