Simplify programs/taskmgr/graph.c based on previous changes

Gerald Pfeifer gerald at pfeifer.com
Sat Dec 29 14:06:17 CST 2007


Isn't it sweat to reap the benefits of ones work elswhere? :-)  This patch
is a direct followup to

    2007-11-15  Gerald Pfeifer <gerald at pfeifer.com>

    * programs/taskmgr/perfdata.c, programs/taskmgr/perfpage.c:
    taskmgr: Move out-of-domain checking into PerfDataGetProcessorUsage() and
    PerfDataGetProcessorSystemUsage().

which, apparently, we missed originally.

Gerald

ChangeLog:
Remove redundant out-of-domain checking which is already handled by
PerfDataGetProcessorUsage() and PerfDataGetProcessorSystemUsage().

Index: programs/taskmgr/graph.c
===================================================================
RCS file: /home/wine/wine/programs/taskmgr/graph.c,v
retrieving revision 1.6
diff -u -3 -p -r1.6 graph.c
--- programs/taskmgr/graph.c	23 May 2006 12:49:22 -0000	1.6
+++ programs/taskmgr/graph.c	29 Dec 2007 20:01:06 -0000
@@ -72,10 +72,6 @@ static void Graph_DrawCpuUsageGraph(HDC 
      */
     CpuUsage = PerfDataGetProcessorUsage();
     CpuKernelUsage = PerfDataGetProcessorSystemUsage();
-    if (CpuUsage < 0)         CpuUsage = 0;
-    if (CpuUsage > 100)       CpuUsage = 100;
-    if (CpuKernelUsage < 0)   CpuKernelUsage = 0;
-    if (CpuKernelUsage > 100) CpuKernelUsage = 100;
 
     /*
      * Check and see how many digits it will take



More information about the wine-patches mailing list