From 1de368e2f26d4f6d5cdd07507a9b18f2c53e7225 Mon Sep 17 00:00:00 2001 From: Hartmut Brandt Date: Thu, 26 Jan 2006 12:15:06 +0000 Subject: [PATCH] Fix a bug in the processor load code: the wrong process was used to get the inital processor load. Also fix compilation on sparc64 without NDEBUG. --- .../bsnmpd/modules/snmp_hostres/hostres_processor_tbl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_processor_tbl.c b/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_processor_tbl.c index cca9bcb86960..faba176c9ea3 100644 --- a/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_processor_tbl.c +++ b/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_processor_tbl.c @@ -242,7 +242,7 @@ processor_get_pids(void) HRDBG("CPU no. %d with SNMP index=%d has idle PID %d", entry->cpu_no, entry->index, entry->idle_pid); - save_sample(entry, plist); + save_sample(entry, kp); } } @@ -427,9 +427,9 @@ static void get_cpus_samples(void *arg __unused) { - HRDBG("[%llu] ENTER", get_ticks()); + HRDBG("[%llu] ENTER", (unsigned long long)get_ticks()); refresh_processor_tbl(); - HRDBG("[%llu] EXIT", get_ticks()); + HRDBG("[%llu] EXIT", (unsigned long long)get_ticks()); } /**