Fix a little logic error
authorLaslo Hunhold <dev@frign.de>
Mon, 14 Aug 2017 08:24:43 +0000 (10:24 +0200)
committerAaron Marcher <me@drkhsh.at>
Mon, 14 Aug 2017 09:35:52 +0000 (11:35 +0200)
slstatus.c

index eb936e22f70511d7ea8ad694cc7d5d27df07fcde..f72f99445f7c2e52d42a1ef5fd18cced6c9ac593 100644 (file)
@@ -169,7 +169,7 @@ cpu_freq(void)
        int freq;
 
        return (pscanf("/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq",
-                      "%i", &freq) != 1) ?
+                      "%i", &freq) == 1) ?
               bprintf("%d", (freq + 500) / 1000) : unknown_str;
 }