]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
math precedence bugfix
authorwessels <>
Sun, 4 Jan 1998 12:43:48 +0000 (12:43 +0000)
committerwessels <>
Sun, 4 Jan 1998 12:43:48 +0000 (12:43 +0000)
src/tools.cc

index a8522fe7b95bf129068aa427174cf020f0de487b..1e23e6ee8bad7eeaf339a8a6c731bb42abf5a0d1 100644 (file)
@@ -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