From b2ea953bee7d9a20e41fc4bf4e4188964317d95d Mon Sep 17 00:00:00 2001 From: David Carter Date: Sat, 12 Nov 2005 16:13:11 +0000 Subject: [PATCH] no behavior change, just change the % calc math so the type conversion and operation precedence is explicit git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky@407 7f574dfc-610e-0410-a909-a81674777703 --- src/top.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/top.c b/src/top.c index 26350ebd..e35b1ad7 100644 --- a/src/top.c +++ b/src/top.c @@ -387,7 +387,7 @@ inline static void calc_cpu_each(unsigned long total) (100.0 * (float) (p->user_time + p->kernel_time) / total) : 0; */ p->amount = - (100.0 * (p->user_time + p->kernel_time) / total); + 100.0 * ((float)(p->user_time + p->kernel_time) / (float)total); /* if (p->amount > 100) p->amount = 0;*/