summaryrefslogtreecommitdiffstats
path: root/openbsd/Platform.c
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/Platform.c
parent61e14d4bb25268593019e6df3eb02264b4ac8e0e (diff)
Embracing branches
Diffstat (limited to 'openbsd/Platform.c')
-rw-r--r--openbsd/Platform.c7
1 files changed, 5 insertions, 2 deletions
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