Remove "divide by zero" workaround
authorMarco Costalba <mcostalba@gmail.com>
Thu, 14 Apr 2011 06:04:32 +0000 (07:04 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Thu, 14 Apr 2011 06:04:32 +0000 (07:04 +0100)
It is now useless because of the condition at the beginning.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/misc.cpp

index 0fc151c51352600148848b4ef246669a9d623f5c..cb2ea168256d4ee2eaa5d55ae5e607b1d41c2242 100644 (file)
@@ -104,14 +104,14 @@ void dbg_print_hit_rate() {
 
   if (dbg_hit_cnt0)
       cout << "Total " << dbg_hit_cnt0 << " Hit " << dbg_hit_cnt1
-           << " hit rate (%) " << 100 * dbg_hit_cnt1 / (dbg_hit_cnt0 + 1) << endl;
+           << " hit rate (%) " << 100 * dbg_hit_cnt1 / dbg_hit_cnt0 << endl;
 }
 
 void dbg_print_mean() {
 
   if (dbg_mean_cnt0)
       cout << "Total " << dbg_mean_cnt0 << " Mean "
-           << (float)dbg_mean_cnt1 / (dbg_mean_cnt0 + 1) << endl;
+           << (float)dbg_mean_cnt1 / dbg_mean_cnt0 << endl;
 }
 
 void dbg_mean_of(int v) {