summaryrefslogtreecommitdiffstats
path: root/openbsd
diff options
context:
space:
mode:
authorBenny Baumann <BenBE@geshi.org>2020-11-01 01:09:51 +0100
committerBenny Baumann <BenBE@geshi.org>2020-11-02 22:15:01 +0100
commit45869513bfebba80cc2ab42e4218f68b34b1e6ac (patch)
treef064631dbff141bf1c945db8cff40b7bb82fd169 /openbsd
parent61e14d4bb25268593019e6df3eb02264b4ac8e0e (diff)
Embracing branches
Diffstat (limited to 'openbsd')
-rw-r--r--openbsd/OpenBSDProcessList.c3
-rw-r--r--openbsd/Platform.c7
2 files changed, 7 insertions, 3 deletions
diff --git a/openbsd/OpenBSDProcessList.c b/openbsd/OpenBSDProcessList.c
index bfac535d..aec13477 100644
--- a/openbsd/OpenBSDProcessList.c
+++ b/openbsd/OpenBSDProcessList.c
@@ -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);
}
diff --git a/openbsd/Platform.c b/openbsd/Platform.c
index 21a33d1e..055ffa99 100644
--- a/openbsd/Platform.c
+++ b/openbsd/Platform.c
@@ -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) {

© 2014-2024 Faster IT GmbH | imprint | privacy policy