From: David Carter Date: Sat, 12 Nov 2005 16:13:11 +0000 (+0000) Subject: no behavior change, just change the % calc math so the type conversion and operation... X-Git-Url: http://vcs.maemo.org/git/?a=commitdiff_plain;h=b2ea953bee7d9a20e41fc4bf4e4188964317d95d;p=monky 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 --- diff --git a/src/top.c b/src/top.c index 26350eb..e35b1ad 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;*/