diff --git a/src/hwmon.cpp b/src/hwmon.cpp index 893f8f9..ed1bd7e 100644 --- a/src/hwmon.cpp +++ b/src/hwmon.cpp @@ -71,14 +71,14 @@ int HwmonInterface::filter_driver_file(const struct dirent *entry) template -vector dir_entries(const filesystem::path &dir) +vector dir_entries(const filesystem::path &dir) { struct dirent **entries; int nentries = ::scandir(dir.c_str(), &entries, filter_fn, nullptr); if (nentries == -1) return {}; - vector rv; + vector rv; for (int i = 0; i < nentries; ++i) { rv.emplace_back(dir / entries[i]->d_name); ::free(entries[i]); @@ -212,12 +212,12 @@ vector HwmonInterface::find_hwmons_by_indices( } catch (IOerror &) { if (depth <= max_depth) { - vector hwmon_dirs = dir_entries(path); + vector hwmon_dirs = dir_entries(path); if (hwmon_dirs.empty()) throw IOerror("Error scanning " + path + ": ", errno); vector rv; - for (const filesystem::path &hwmon_dir : hwmon_dirs) { + for (const filesystem::path hwmon_dir : hwmon_dirs) { rv = HwmonInterface::find_hwmons_by_indices( hwmon_dir, indices, @@ -280,7 +280,7 @@ string HwmonInterface::lookup() throw DriverInitError(path + ": " + "Could not find any hwmons in " + path); } else { - vector paths = dir_entries(path); + vector paths = dir_entries(path); found_paths_.swap(paths); }