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
4716a985
Commit
4716a985
authored
Apr 11, 2014
by
Hisham Muhammad
Browse files
Fix logic for skipping non-numeric directories.
Closes #42.
parent
96858744
Changes
1
Hide whitespace changes
Inline
Side-by-side
ProcessList.c
View file @
4716a985
...
@@ -741,8 +741,9 @@ static bool ProcessList_processEntries(ProcessList* this, const char* dirname, P
...
@@ -741,8 +741,9 @@ static bool ProcessList_processEntries(ProcessList* this, const char* dirname, P
}
}
// Just skip all non-number directories.
// Just skip all non-number directories.
if
(
name
[
0
]
<
=
'0'
||
name
[
0
]
>
=
'9'
)
if
(
name
[
0
]
<
'0'
||
name
[
0
]
>
'9'
)
{
continue
;
continue
;
}
// filename is a number: process directory
// filename is a number: process directory
int
pid
=
atoi
(
name
);
int
pid
=
atoi
(
name
);
...
...
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