From b41b590457d2b57ad6405527e7364531af814440 Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Thu, 14 Apr 2011 07:04:32 +0100 Subject: [PATCH] Remove "divide by zero" workaround It is now useless because of the condition at the beginning. No functional change. Signed-off-by: Marco Costalba --- src/misc.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/misc.cpp b/src/misc.cpp index 0fc151c5..cb2ea168 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -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) { -- 2.39.2