cpu_usage: Fix ScopeGuard renaming in bsd-only file

pull/2611/head
Tamino Bauknecht 2023-10-26 17:30:48 +02:00
parent 33f8a02fb5
commit 7d8c1494d7
No known key found for this signature in database
GPG Key ID: 77837396BE935C6C
1 changed files with 1 additions and 1 deletions

View File

@ -34,7 +34,7 @@ std::vector<std::tuple<size_t, size_t>> waybar::modules::CpuUsage::parseCpuinfo(
int ncpu = sysconf(_SC_NPROCESSORS_CONF);
size_t sz = CPUSTATES * (ncpu + 1) * sizeof(pcp_time_t);
pcp_time_t *cp_time = static_cast<pcp_time_t *>(malloc(sz)), *pcp_time = cp_time;
waybar::util::scope_guard cp_time_deleter([cp_time]() {
waybar::util::ScopeGuard cp_time_deleter([cp_time]() {
if (cp_time) {
free(cp_time);
}