1
0
Fork 0

Fix a little logic error

This commit is contained in:
Laslo Hunhold 2017-08-14 10:24:43 +02:00 committed by Aaron Marcher
parent e1e1b1d79a
commit 0f7e022381
No known key found for this signature in database
GPG key ID: 74B048E5C2474F9A

View file

@ -169,7 +169,7 @@ cpu_freq(void)
int freq; int freq;
return (pscanf("/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_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; bprintf("%d", (freq + 500) / 1000) : unknown_str;
} }