Chore: fix a lot code smell

This commit is contained in:
李通洲
2025-03-25 20:03:09 +08:00
parent bf17f2b4b9
commit 7562e05123
23 changed files with 83 additions and 45 deletions
+3
View File
@@ -3,6 +3,7 @@
#include <mach/processor_info.h>
#include <mach/mach_host.h>
#include <mach/vm_map.h>
const char* ffGetCpuUsageInfo(FFlist* cpuTimes)
{
@@ -28,5 +29,7 @@ const char* ffGetCpuUsageInfo(FFlist* cpuTimes)
.totalAll = (uint64_t)total,
};
}
vm_deallocate(mach_task_self(), (vm_address_t) cpuInfo, numCpuInfo * sizeof(integer_t));
return NULL;
}