Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
htop
Commits
5b302808
Commit
5b302808
authored
Apr 21, 2014
by
Hisham Muhammad
Browse files
shorten scope of variables.
parent
0a4ddab2
Changes
1
Hide whitespace changes
Inline
Side-by-side
ProcessList.c
View file @
5b302808
...
...
@@ -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
,
virtall
time
;
unsigned
long
long
int
usertime
,
nicetime
,
systemtime
,
idle
time
;
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.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment