lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1468775514-6208-1-git-send-email-wsa@the-dreams.de>
Date:	Sun, 17 Jul 2016 19:11:54 +0200
From:	Wolfram Sang <wsa@...-dreams.de>
To:	linux-kernel@...r.kernel.org
Cc:	Wolfram Sang <wsa@...-dreams.de>, Michal Marek <mmarek@...e.com>
Subject: [PATCH] scripts: bloat-o-meter: enforce float for percentage

From: Wolfram Sang <wsa-dev@...g-engineering.com>

The printout for the percentage of changes was expected to be a float,
but the calculation was kept as integer. Enforce float to get more
precise numbers. Add spaces around operators while here.

Signed-off-by: Wolfram Sang <wsa-dev@...g-engineering.com>
---
 scripts/bloat-o-meter | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/bloat-o-meter b/scripts/bloat-o-meter
index 0254f3ba0dbab0..a73751db91774e 100755
--- a/scripts/bloat-o-meter
+++ b/scripts/bloat-o-meter
@@ -68,4 +68,4 @@ for d, n in delta:
     if d: print("%-40s %7s %7s %+7d" % (n, old.get(n,"-"), new.get(n,"-"), d))
 
 print("Total: Before=%d, After=%d, chg %f%%" % \
-    (otot, ntot, (ntot - otot)*100/otot))
+    (otot, ntot, (ntot - otot) * 100.0 / otot))
-- 
2.8.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ