summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2014-04-21 19:00:35 -0300
committerHisham Muhammad <hisham@gobolinux.org>2014-04-21 19:00:35 -0300
commit5b302808108290928cdd0c526462ba0dfbaad8f5 (patch)
tree9c26dfdf5ddddfdddee964a385a2b41a1536b3a2
parent0a4ddab2a423d5295ad864517c17be3effef931d (diff)
shorten scope of variables.
-rw-r--r--ProcessList.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ProcessList.c b/ProcessList.c
index 1d92abb6..e0c1f816 100644
--- a/ProcessList.c
+++ b/ProcessList.c
@@ -874,7 +874,7 @@ static bool ProcessList_processEntries(ProcessList* this, const char* dirname, P
}
void ProcessList_scan(ProcessList* this) {
- unsigned long long int usertime, nicetime, systemtime, systemalltime, idlealltime, idletime, totaltime, virtalltime;
+ unsigned long long int usertime, nicetime, systemtime, idletime;
unsigned long long int swapFree = 0;
FILE* file = fopen(PROCMEMINFOFILE, "r");
@@ -925,6 +925,7 @@ void ProcessList_scan(ProcessList* this) {
char buffer[256];
int cpuid;
unsigned long long int ioWait, irq, softIrq, steal, guest, guestnice;
+ unsigned long long int systemalltime, idlealltime, totaltime, virtalltime;
ioWait = irq = softIrq = steal = guest = guestnice = 0;
// Dependending on your kernel version,
// 5, 7, 8 or 9 of these fields will be set.

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