diff options
Diffstat (limited to 'cpulist.c')
-rw-r--r-- | cpulist.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -19,7 +19,7 @@ void cpulist_add(char *cpu) int newlen; newlen=cpudata.cpulist_len+1; - cpudata.cpulist=reallocarray(cpudata.cpulist,newlen,sizeof(char *)); + cpudata.cpulist=reallocarray(cpudata.cpulist,(size_t) newlen,sizeof(char *)); cpudata.cpulist[cpudata.cpulist_len]=malloc(strlen(cpu)+1); strcpy(cpudata.cpulist[cpudata.cpulist_len],cpu); @@ -77,7 +77,7 @@ int cpulist_find_cpus() { DEBUG2_CPULIST("Found CPU %s\n",cpu_dirent->d_name); snprintf(sysfs_file,309,"/sys/devices/system/cpu/%s/topology/physical_package_id",cpu_dirent->d_name); - package=sysfs_read_long_int(sysfs_file); + package=(int) sysfs_read_long_int(sysfs_file); DEBUG2_CPULIST("CPU Belongs to package id %d\n",package); if ((package==config.cpu) || (config.cpu<0)) { |