Ilias Apalodimas(apalos) replied on github web page:

platform/linux-generic/odp_system_info.c
line 22
@@ -326,6 +327,23 @@ int odp_system_info_init(void)
 
        fclose(file);
 
+       for (i = 0; i < MAX_CPU_NUMBER; i++) {
+               char temp[256], *endptr = NULL;
+               snprintf(temp, sizeof(temp),
+                        
"/sys/devices/system/cpu/cpu%d/cpufreq/cpuinfo_max_freq",
+                        i);
+
+               file = fopen(temp, "r");
+               if (file == NULL)
+                       continue;
+
+               if (fgets(temp, sizeof(temp), file) == temp)


Comment:
This should not be checked against itself, should be against NULL.

https://github.com/Linaro/odp/pull/171#discussion_r138175960
updated_at 2017-09-11 20:09:55

Reply via email to