aboutsummaryrefslogtreecommitdiffstats
path: root/cpulist.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpulist.c')
-rw-r--r--cpulist.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cpulist.c b/cpulist.c
index eb219b5..c6af342 100644
--- a/cpulist.c
+++ b/cpulist.c
@@ -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))
{