Embracing branches

This commit is contained in:
Benny Baumann
2020-11-01 01:09:51 +01:00
parent 61e14d4bb2
commit 45869513bf
46 changed files with 656 additions and 277 deletions

View File

@ -347,8 +347,9 @@ void ProcessList_goThroughEntries(ProcessList* super, bool pauseProcessUpdate) {
OpenBSDProcessList_scanCPUTime(opl);
// in pause mode only gather global data for meters (CPU/memory/...)
if (pauseProcessUpdate)
if (pauseProcessUpdate) {
return;
}
OpenBSDProcessList_scanProcs(opl);
}

View File

@ -184,7 +184,9 @@ double Platform_setCPUValues(Meter* this, int cpu) {
}
totalPercent = CLAMP(totalPercent, 0.0, 100.0);
if (isnan(totalPercent)) totalPercent = 0.0;
if (isnan(totalPercent)) {
totalPercent = 0.0;
}
return totalPercent;
}
@ -250,8 +252,9 @@ char* Platform_getProcessEnv(pid_t pid) {
struct kinfo_proc* kproc;
size_t capacity = 4096, size = 0;
if ((kt = kvm_openfiles(NULL, NULL, NULL, KVM_NO_FILES, errbuf)) == NULL)
if ((kt = kvm_openfiles(NULL, NULL, NULL, KVM_NO_FILES, errbuf)) == NULL) {
return NULL;
}
if ((kproc = kvm_getprocs(kt, KERN_PROC_PID, pid,
sizeof(struct kinfo_proc), &count)) == NULL) {