Fix build without -DNDEBUG.
Spotted by: obrien
This commit is contained in:
parent
52828c0e9c
commit
6c5d6ce3dd
@ -399,7 +399,7 @@ refresh_processor_tbl(void)
|
||||
continue;
|
||||
}
|
||||
|
||||
assert(hrState_g.kd != NULL);
|
||||
assert(hr_kd != NULL);
|
||||
|
||||
plist = kvm_getprocs(hr_kd, KERN_PROC_PID,
|
||||
entry->idle_pid, &nproc);
|
||||
|
@ -97,9 +97,9 @@ OS_getSystemUptime(uint32_t *ut)
|
||||
return (SNMP_ERR_GENERR);
|
||||
}
|
||||
|
||||
HRDBG("boot timestamp from kernel: {%ld, %ld}",
|
||||
kernel_boot_timestamp.tv_sec,
|
||||
kernel_boot_timestamp.tv_usec);
|
||||
HRDBG("boot timestamp from kernel: {%lld, %ld}",
|
||||
(long long)kernel_boot_timestamp.tv_sec,
|
||||
(long)kernel_boot_timestamp.tv_usec);
|
||||
|
||||
kernel_boot = ((uint64_t)kernel_boot_timestamp.tv_sec * 100) +
|
||||
(kernel_boot_timestamp.tv_usec / 10000);
|
||||
|
@ -207,7 +207,7 @@ kinfo_proc_to_swrun_entry(const struct kinfo_proc *kp,
|
||||
entry->path[0] = '\0';
|
||||
entry->parameters[0] = '\0';
|
||||
|
||||
assert(hrState_g.kd != NULL);
|
||||
assert(hr_kd != NULL);
|
||||
|
||||
argv = kvm_getargv(hr_kd, kp, sizeof(entry->parameters) - 1);
|
||||
if(argv != NULL){
|
||||
@ -423,7 +423,7 @@ fetch_swrun_entry(struct swrun_entry *entry)
|
||||
|
||||
} else {
|
||||
/* this is a process */
|
||||
assert(hrState_g.kd != NULL);
|
||||
assert(hr_kd != NULL);
|
||||
plist = kvm_getprocs(hr_kd, KERN_PROC_PID,
|
||||
entry->index - 1, &nproc);
|
||||
if (plist == NULL || nproc != 1) {
|
||||
@ -489,7 +489,7 @@ invalidate_swrun_entry(struct swrun_entry *entry, int commit)
|
||||
}
|
||||
} else {
|
||||
/* this is a process */
|
||||
assert(hrState_g.kd != NULL);
|
||||
assert(hr_kd != NULL);
|
||||
|
||||
plist = kvm_getprocs(hr_kd, KERN_PROC_PID,
|
||||
entry->index - 1, &nproc);
|
||||
|
Loading…
Reference in New Issue
Block a user