summaryrefslogtreecommitdiffstats
path: root/collectors/freebsd.plugin
diff options
context:
space:
mode:
Diffstat (limited to 'collectors/freebsd.plugin')
-rw-r--r--collectors/freebsd.plugin/freebsd_sysctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/collectors/freebsd.plugin/freebsd_sysctl.c b/collectors/freebsd.plugin/freebsd_sysctl.c
index 402813fe0..271547ab3 100644
--- a/collectors/freebsd.plugin/freebsd_sysctl.c
+++ b/collectors/freebsd.plugin/freebsd_sysctl.c
@@ -470,7 +470,7 @@ int do_dev_cpu_temperature(int update_every, usec_t dt) {
pcpu_temperature = reallocz(pcpu_temperature, sizeof(int) * number_of_cpus);
mib = reallocz(mib, sizeof(int) * number_of_cpus * 4);
if (unlikely(number_of_cpus > old_number_of_cpus))
- memset(&mib[old_number_of_cpus * 4], 0, sizeof(RRDDIM) * (number_of_cpus - old_number_of_cpus));
+ memset(&mib[old_number_of_cpus * 4], 0, 4 * (number_of_cpus - old_number_of_cpus));
}
for (i = 0; i < number_of_cpus; i++) {
if (unlikely(!(mib[i * 4])))