< prev index next >

src/share/vm/gc_implementation/shared/gcUtil.hpp

Print this page
rev 7793 : 8073315: Enable gcc -Wtype-limits and fix upcoming issues.

@@ -101,11 +101,11 @@
   // Update data with a new sample.
   void sample(float new_sample);
 
   static inline float exp_avg(float avg, float sample,
                                unsigned int weight) {
-    assert(0 <= weight && weight <= 100, "weight must be a percent");
+    assert(weight <= 100, "weight must be a percent");
     return (100.0F - weight) * avg / 100.0F + weight * sample / 100.0F;
   }
   static inline size_t exp_avg(size_t avg, size_t sample,
                                unsigned int weight) {
     // Convert to float and back to avoid integer overflow.
< prev index next >