summaryrefslogtreecommitdiffstats
path: root/darwin/DarwinProcess.c
diff options
context:
space:
mode:
authorBenny Baumann <BenBE@geshi.org>2020-10-31 22:14:27 +0100
committerBenny Baumann <BenBE@geshi.org>2020-11-02 22:15:01 +0100
commitb23f8235e28472c410dcb00893e0e3d403892673 (patch)
treeaecb7abcfa9f48caf43c21c54544cb21c2f65112 /darwin/DarwinProcess.c
parent9a16b1079ec1e831a449eb23ff23bf13b1b2a935 (diff)
Whitespace and indentation issues
Diffstat (limited to 'darwin/DarwinProcess.c')
-rw-r--r--darwin/DarwinProcess.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/darwin/DarwinProcess.c b/darwin/DarwinProcess.c
index 8ad7a6d8..a92f2661 100644
--- a/darwin/DarwinProcess.c
+++ b/darwin/DarwinProcess.c
@@ -158,12 +158,12 @@ char *DarwinProcess_getCmdLine(struct kinfo_proc* k, int* basenameOffset) {
/* Convert previous '\0'. */
*np = ' ';
}
- /* Note location of current '\0'. */
- np = cp;
- if (*basenameOffset == 0) {
- *basenameOffset = cp - sp;
- }
- }
+ /* Note location of current '\0'. */
+ np = cp;
+ if (*basenameOffset == 0) {
+ *basenameOffset = cp - sp;
+ }
+ }
}
/*
@@ -247,10 +247,10 @@ void DarwinProcess_setFromLibprocPidinfo(DarwinProcess *proc, DarwinProcessList
if (sizeof(pti) == proc_pidinfo(proc->super.pid, PROC_PIDTASKINFO, 0, &pti, sizeof(pti))) {
if (0 != proc->utime || 0 != proc->stime) {
uint64_t diff = (pti.pti_total_system - proc->stime)
- + (pti.pti_total_user - proc->utime);
+ + (pti.pti_total_user - proc->utime);
proc->super.percent_cpu = (double)diff * (double)dpl->super.cpuCount
- / ((double)dpl->global_diff * 100000.0);
+ / ((double)dpl->global_diff * 100000.0);
// fprintf(stderr, "%f %llu %llu %llu %llu %llu\n", proc->super.percent_cpu,
// proc->stime, proc->utime, pti.pti_total_system, pti.pti_total_user, dpl->global_diff);
@@ -263,7 +263,7 @@ void DarwinProcess_setFromLibprocPidinfo(DarwinProcess *proc, DarwinProcessList
proc->super.m_resident = pti.pti_resident_size / CRT_pageSize;
proc->super.majflt = pti.pti_faults;
proc->super.percent_mem = (double)pti.pti_resident_size * 100.0
- / (double)dpl->host_info.max_mem;
+ / (double)dpl->host_info.max_mem;
proc->stime = pti.pti_total_system;
proc->utime = pti.pti_total_user;

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