diff options
-rw-r--r-- | gnu/usr.bin/gdb/kgdb/kthr.c | 2 | ||||
-rw-r--r-- | lib/libkvm/kvm_pcpu.c | 2 | ||||
-rw-r--r-- | lib/libmemstat/memstat_uma.c | 2 | ||||
-rw-r--r-- | usr.sbin/pmccontrol/pmccontrol.c | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/gnu/usr.bin/gdb/kgdb/kthr.c b/gnu/usr.bin/gdb/kgdb/kthr.c index 7b39929..461f408 100644 --- a/gnu/usr.bin/gdb/kgdb/kthr.c +++ b/gnu/usr.bin/gdb/kgdb/kthr.c @@ -107,7 +107,7 @@ kgdb_thr_init(void) addr = kgdb_lookup("stopped_cpus"); CPU_ZERO(&stopped_cpus); cpusetsize = sysconf(_SC_CPUSET_SIZE); - if (cpusetsize != -1 && (size_t)cpusetsize <= sizeof(cpuset_t) && + if (cpusetsize != -1 && (u_long)cpusetsize <= sizeof(cpuset_t) && addr != 0) kvm_read(kvm, addr, &stopped_cpus, cpusetsize); diff --git a/lib/libkvm/kvm_pcpu.c b/lib/libkvm/kvm_pcpu.c index 7e421ae..bc73baf 100644 --- a/lib/libkvm/kvm_pcpu.c +++ b/lib/libkvm/kvm_pcpu.c @@ -131,7 +131,7 @@ kvm_getpcpu(kvm_t *kd, int cpu) } kcpusetsize = sysconf(_SC_CPUSET_SIZE); - if (kcpusetsize == -1 || (size_t)kcpusetsize > sizeof(cpuset_t)) + if (kcpusetsize == -1 || (u_long)kcpusetsize > sizeof(cpuset_t)) return ((void *)-1); if (maxcpu == 0) diff --git a/lib/libmemstat/memstat_uma.c b/lib/libmemstat/memstat_uma.c index b9bde7d..485a4f2 100644 --- a/lib/libmemstat/memstat_uma.c +++ b/lib/libmemstat/memstat_uma.c @@ -341,7 +341,7 @@ memstat_kvm_uma(struct memory_type_list *list, void *kvm_handle) return (-1); } cpusetsize = sysconf(_SC_CPUSET_SIZE); - if (cpusetsize == -1 || (size_t)cpusetsize > sizeof(cpuset_t)) { + if (cpusetsize == -1 || (u_long)cpusetsize > sizeof(cpuset_t)) { list->mtl_error = MEMSTAT_ERROR_KVM_NOSYMBOL; return (-1); } diff --git a/usr.sbin/pmccontrol/pmccontrol.c b/usr.sbin/pmccontrol/pmccontrol.c index 28f7ab4..80d4bd7 100644 --- a/usr.sbin/pmccontrol/pmccontrol.c +++ b/usr.sbin/pmccontrol/pmccontrol.c @@ -148,7 +148,7 @@ pmcc_do_enable_disable(struct pmcc_op_list *op_list) /* Determine the set of active CPUs. */ cpusetsize = sysconf(_SC_CPUSET_SIZE); - if (cpusetsize == -1 || (size_t)cpusetsize > sizeof(cpuset_t)) { + if (cpusetsize == -1 || (u_long)cpusetsize > sizeof(cpuset_t)) { err(EX_OSERR, "ERROR: Cannot determine which CPUs are " "halted"); } |