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
36b78328
Commit
36b78328
authored
Jan 19, 2015
by
Hisham Muhammad
Browse files
Fix initialization of cpuData structure. Closes #159.
parent
430c7c9a
Changes
1
Hide whitespace changes
Inline
Side-by-side
linux/LinuxProcessList.c
View file @
36b78328
...
...
@@ -63,7 +63,7 @@ ProcessList* ProcessList_new(UsersTable* usersTable, Hashtable* pidWhiteList) {
fclose
(
file
);
this
->
cpuCount
=
MAX
(
cpus
-
1
,
1
);
this
->
cpus
=
re
alloc
(
this
->
cpus
,
cpus
*
sizeof
(
CPUData
));
this
->
cpus
=
c
alloc
(
cpus
,
sizeof
(
CPUData
));
for
(
int
i
=
0
;
i
<
cpus
;
i
++
)
{
this
->
cpus
[
i
].
totalTime
=
1
;
...
...
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