diff --git a/openbsd/OpenBSDMachine.c b/openbsd/OpenBSDMachine.c index e8ff92320..954483976 100644 --- a/openbsd/OpenBSDMachine.c +++ b/openbsd/OpenBSDMachine.c @@ -96,7 +96,7 @@ Machine* Machine_new(UsersTable* usersTable, uid_t userId) { Machine_init(super, usersTable, userId); - OpenBSDProcessList_updateCPUcount(this); + OpenBSDMachine_updateCPUcount(this); size = sizeof(this->fscale); if (sysctl(fmib, 2, &this->fscale, &size, NULL, 0) < 0) { @@ -114,7 +114,7 @@ Machine* Machine_new(UsersTable* usersTable, uid_t userId) { this->cpuSpeed = -1; - return this; + return super; } void Machine_delete(Machine* super) { @@ -129,7 +129,7 @@ void Machine_delete(Machine* super) { } static void OpenBSDMachine_scanMemoryInfo(OpenBSDMachine* this) { - Machine* host = &this->super; + Machine* super = &this->super; const int uvmexp_mib[] = { CTL_VM, VM_UVMEXP }; struct uvmexp uvmexp; size_t size_uvmexp = sizeof(uvmexp); @@ -230,7 +230,7 @@ static void kernelCPUTimesToHtop(const u_int64_t* times, CPUData* cpu) { } static void OpenBSDMachine_scanCPUTime(OpenBSDMachine* this) { - Machine* host = &this->super; + Machine* super = &this->super; u_int64_t kernelTimes[CPUSTATES] = {0}; u_int64_t avg[CPUSTATES] = {0}; diff --git a/openbsd/OpenBSDProcessList.c b/openbsd/OpenBSDProcessList.c index 84c833c3c..d0ef12456 100644 --- a/openbsd/OpenBSDProcessList.c +++ b/openbsd/OpenBSDProcessList.c @@ -128,7 +128,7 @@ static double getpcpu(const OpenBSDMachine* ohost, const struct kinfo_proc* kp) } static void OpenBSDProcessList_scanProcs(OpenBSDProcessList* this) { - Machine* host = this->super.host; + Machine* host = this->super.super.host; OpenBSDMachine* ohost = (OpenBSDMachine*) host; const Settings* settings = host->settings; const bool hideKernelThreads = settings->hideKernelThreads;