netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=09e0288ab0dc1c75c702c5d6194e9e80521b4fbd

commit 09e0288ab0dc1c75c702c5d6194e9e80521b4fbd
Author: Alastair Poole <nets...@gmail.com>
Date:   Tue Nov 10 02:06:34 2020 +0000

    cpu: small fix to logic.
---
 src/bin/system/machine/cpu.bogox | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/bin/system/machine/cpu.bogox b/src/bin/system/machine/cpu.bogox
index b57719b..f0b395d 100644
--- a/src/bin/system/machine/cpu.bogox
+++ b/src/bin/system/machine/cpu.bogox
@@ -492,7 +492,8 @@ system_cpu_frequency_min_max_get(int *min, int *max)
              free(s);
              *min = freq_min;
              *max = freq_max;
-             return 0;
+             if (freq_min < freq_max)
+               return 0;
           }
      }
 
@@ -503,8 +504,11 @@ system_cpu_frequency_min_max_get(int *min, int *max)
    while (t)
      {
         int freq = atoi(t);
-        if (freq > freq_max) freq_max = freq;
-        if (freq < freq_min) freq_min = freq;
+        if (freq != 0)
+          {
+             if (freq > freq_max) freq_max = freq;
+             if (freq < freq_min) freq_min = freq;
+          }
         t = strtok(NULL, " ");
      }
 

-- 


Reply via email to