summaryrefslogtreecommitdiffstats
path: root/darwin/Platform.c
diff options
context:
space:
mode:
authorBenny Baumann <BenBE@geshi.org>2020-10-31 23:28:02 +0100
committerBenny Baumann <BenBE@geshi.org>2020-11-02 22:15:01 +0100
commit61e14d4bb25268593019e6df3eb02264b4ac8e0e (patch)
tree910b68d9a5ee1c4d25b2cf3ee24abaaf3e6a096b /darwin/Platform.c
parentb23f8235e28472c410dcb00893e0e3d403892673 (diff)
Spacing around operators
Diffstat (limited to 'darwin/Platform.c')
-rw-r--r--darwin/Platform.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/darwin/Platform.c b/darwin/Platform.c
index c5a22da4..e48fbbd3 100644
--- a/darwin/Platform.c
+++ b/darwin/Platform.c
@@ -176,7 +176,7 @@ ProcessPidColumn Process_pidColumns[] = {
};
static double Platform_setCPUAverageValues(Meter* mtr) {
- const ProcessList *dpl = mtr->pl;
+ const ProcessList* dpl = mtr->pl;
int cpus = dpl->cpuCount;
double sumNice = 0.0;
double sumNormal = 0.0;
@@ -200,9 +200,9 @@ double Platform_setCPUValues(Meter* mtr, int cpu) {
return Platform_setCPUAverageValues(mtr);
}
- const DarwinProcessList *dpl = (const DarwinProcessList *)mtr->pl;
- const processor_cpu_load_info_t prev = &dpl->prev_load[cpu-1];
- const processor_cpu_load_info_t curr = &dpl->curr_load[cpu-1];
+ const DarwinProcessList* dpl = (const DarwinProcessList*)mtr->pl;
+ const processor_cpu_load_info_t prev = &dpl->prev_load[cpu - 1];
+ const processor_cpu_load_info_t curr = &dpl->curr_load[cpu - 1];
double total = 0;
/* Take the sums */
@@ -228,7 +228,7 @@ double Platform_setCPUValues(Meter* mtr, int cpu) {
}
void Platform_setMemoryValues(Meter* mtr) {
- const DarwinProcessList *dpl = (const DarwinProcessList *)mtr->pl;
+ const DarwinProcessList* dpl = (const DarwinProcessList*)mtr->pl;
const struct vm_statistics* vm = &dpl->vm_stats;
double page_K = (double)vm_page_size / (double)1024;
@@ -283,14 +283,14 @@ char* Platform_getProcessEnv(pid_t pid) {
p += sizeof(int);
// skip exe
- p = strchr(p, 0)+1;
+ p = strchr(p, 0) + 1;
// skip padding
while (!*p && p < endp)
++p;
// skip argv
- for (; argc-- && p < endp; p = strrchr(p, 0)+1)
+ for (; argc-- && p < endp; p = strrchr(p, 0) + 1)
;
// skip padding
@@ -298,10 +298,10 @@ char* Platform_getProcessEnv(pid_t pid) {
++p;
size_t size = endp - p;
- env = xMalloc(size+2);
+ env = xMalloc(size + 2);
memcpy(env, p, size);
env[size] = 0;
- env[size+1] = 0;
+ env[size + 1] = 0;
}
}
free(buf);
@@ -317,10 +317,10 @@ bool Platform_getDiskIO(DiskIOData* data) {
return false;
}
-bool Platform_getNetworkIO(unsigned long int *bytesReceived,
- unsigned long int *packetsReceived,
- unsigned long int *bytesTransmitted,
- unsigned long int *packetsTransmitted) {
+bool Platform_getNetworkIO(unsigned long int* bytesReceived,
+ unsigned long int* packetsReceived,
+ unsigned long int* bytesTransmitted,
+ unsigned long int* packetsTransmitted) {
// TODO
*bytesReceived = 0;
*packetsReceived = 0;

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