Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
4bf41957
Commit
4bf41957
authored
Apr 17, 2010
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
skins: use readdir_r() instead of readdir()
parent
ed9336c9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
modules/gui/skins2/x11/x11_factory.cpp
modules/gui/skins2/x11/x11_factory.cpp
+7
-2
No files found.
modules/gui/skins2/x11/x11_factory.cpp
View file @
4bf41957
...
...
@@ -201,6 +201,11 @@ void X11Factory::getMousePos( int &rXPos, int &rYPos ) const
void
X11Factory
::
rmDir
(
const
string
&
rPath
)
{
struct
{
struct
dirent
ent
;
char
buf
[
NAME_MAX
+
1
];
}
buf
;
struct
dirent
*
file
;
DIR
*
dir
;
...
...
@@ -208,7 +213,7 @@ void X11Factory::rmDir( const string &rPath )
if
(
!
dir
)
return
;
// Parse the directory and remove everything it contains
while
(
(
file
=
readdir
(
dir
))
)
while
(
readdir_r
(
dir
,
&
buf
.
ent
,
&
file
)
==
0
&&
file
!=
NULL
)
{
struct
stat
statbuf
;
string
filename
=
file
->
d_name
;
...
...
@@ -221,7 +226,7 @@ void X11Factory::rmDir( const string &rPath )
filename
=
rPath
+
"/"
+
filename
;
if
(
!
stat
(
filename
.
c_str
(),
&
statbuf
)
&&
statbuf
.
st_mode
&
S_IFDIR
)
if
(
!
stat
(
filename
.
c_str
(),
&
statbuf
)
&&
S_ISDIR
(
statbuf
.
st_mode
)
)
{
rmDir
(
filename
);
}
...
...
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