From e95f94db75fdd100fc72b851369535c4bdd290eb Mon Sep 17 00:00:00 2001 From: "David A. Wheeler" Date: Sat, 12 Jul 2014 12:07:24 -0400 Subject: [PATCH] Fix report on time executed (fix bug#7) - The time reported was wrong in a misguided attempt to round. --- flawfinder | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flawfinder b/flawfinder index e8a03e7..b427634 100755 --- a/flawfinder +++ b/flawfinder @@ -1793,9 +1793,9 @@ def show_final_results(): time_analyzing = time.time() - starttime print "Lines analyzed = %d" % sumlines, if time_analyzing > 0 and not omit_time: # Avoid divide-by-zero. - print "in %.2f seconds (%d lines/second)" % ( - time_analyzing + 0.5, - (int) (sumlines / time_analyzing + 0.5) ) + print "in %.2f seconds (%.0f lines/second)" % ( + time_analyzing, + (sumlines * 1.0 / time_analyzing) ) else: print if output_format: print "
"