make it take size after all

This commit is contained in:
2026-05-11 11:01:37 +00:00
parent c26ccba813
commit 574f59b8f5
5 changed files with 8 additions and 8 deletions

View File

@@ -12,7 +12,7 @@ void cpu_detect(struct cpu_sensors_t *t, const char *pci_dev) {
t->num_cores = sysconf(_SC_NPROCESSORS_ONLN);
snprintf(t->hwmon, sizeof(t->hwmon), "/sys/bus/pci/devices/%s/hwmon", pci_dev);
const int ret = get_hwmon_dir(t->hwmon);
const int ret = get_hwmon_dir(t->hwmon, sizeof(t->hwmon));
if (ret != 0) {
t->hwmon[0] = '\0';
applog(LOG_WRN, "Detected %d cores, module enum #%d. Can't get hwmon path, skipping", t->num_cores, t->module);