From: wessels <> Date: Sun, 4 Jan 1998 12:43:48 +0000 (+0000) Subject: math precedence bugfix X-Git-Tag: SQUID_3_0_PRE1~4267 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b14e03c0bf52278e65234ff92d804e5f1d2a3b71;p=thirdparty%2Fsquid.git math precedence bugfix --- diff --git a/src/tools.cc b/src/tools.cc index a8522fe7b9..1e23e6ee8b 100644 --- a/src/tools.cc +++ b/src/tools.cc @@ -1,6 +1,6 @@ /* - * $Id: tools.cc,v 1.140 1998/01/02 21:52:40 wessels Exp $ + * $Id: tools.cc,v 1.141 1998/01/04 05:43:48 wessels Exp $ * * DEBUG: section 21 Misc Functions * AUTHOR: Harvest Derived @@ -795,7 +795,7 @@ intAverage(int cur, int new, int n, int max) { if (n > max) n = max; - return (cur * (n - 1)) + new / n; + return (cur * (n - 1) + new) / n; } void