Fix Truncation warning cpufreq-linux.c->cpufreq_available_governors

limit cpu identifer to 0xFFFF

Change-Id: I6fb170aa7ce32b7b5c0366bbd689878bb5069be8
This commit is contained in:
William Wilgus 2018-12-06 22:33:30 -06:00
parent cf6584a483
commit 5264a6eac1

View file

@ -60,7 +60,7 @@ void cpufreq_available_governors(char* governors, int governors_size, int cpu)
snprintf(available_governors_interface,
sizeof(available_governors_interface),
"/sys/devices/system/cpu/cpu%d/cpufreq/scaling_available_governors",
cpu);
cpu & 0xFFFF);
FILE *f = open_read(available_governors_interface);
if(f == NULL)