[B.A.T.M.A.N.] [PATCH] Don't convert uint64_t to float when only comparing against 0

Sven Eckelmann sven.eckelmann at gmx.de
Mon Dec 1 18:57:02 UTC 2008


Signed-off-by: Sven Eckelmann <sven.eckelmann at gmx.de>
---
 batman/profile.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/batman/profile.c b/batman/profile.c
index 55b0450..d9eaf13 100644
--- a/batman/profile.c
+++ b/batman/profile.c
@@ -65,7 +65,7 @@ void prof_print(void) {
 
 	for ( index = 0; index < PROF_COUNT; index++ ) {
 
-		debug_output( 5, "   %''30s: cpu time = %10.3f, calls = %''10i, avg time per call = %4.10f \n", prof_container[index].name, (float)prof_container[index].total_time/CLOCKS_PER_SEC, prof_container[index].calls, ( (float)prof_container[index].calls == 0 ? 0.0 : ( ( (float)prof_container[index].total_time/CLOCKS_PER_SEC ) / (float)prof_container[index].calls ) ) );
+		debug_output( 5, "   %''30s: cpu time = %10.3f, calls = %''10i, avg time per call = %4.10f \n", prof_container[index].name, (float)prof_container[index].total_time/CLOCKS_PER_SEC, prof_container[index].calls, ( prof_container[index].calls == 0 ? 0.0 : ( ( (float)prof_container[index].total_time/CLOCKS_PER_SEC ) / (float)prof_container[index].calls ) ) );
 
 	}
 
-- 
1.6.0.4




More information about the B.A.T.M.A.N mailing list