From: wessels <> Date: Wed, 2 Aug 2000 04:01:29 +0000 (+0000) Subject: DW: X-Git-Tag: SQUID_3_0_PRE1~1880 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ad590e13a47ad9cde1f40f7576d8bb5c2ab489ae;p=thirdparty%2Fsquid.git 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. --- 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;