Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
ecb68108
Commit
ecb68108
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()
(cherry picked from commit 4bf419574b51ced5dea893f9e247fe38a2a0d163)
parent
8d86389f
Changes
1
Show 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 @
ecb68108
...
@@ -201,6 +201,11 @@ void X11Factory::getMousePos( int &rXPos, int &rYPos ) const
...
@@ -201,6 +201,11 @@ void X11Factory::getMousePos( int &rXPos, int &rYPos ) const
void
X11Factory
::
rmDir
(
const
string
&
rPath
)
void
X11Factory
::
rmDir
(
const
string
&
rPath
)
{
{
struct
{
struct
dirent
ent
;
char
buf
[
NAME_MAX
+
1
];
}
buf
;
struct
dirent
*
file
;
struct
dirent
*
file
;
DIR
*
dir
;
DIR
*
dir
;
...
@@ -208,7 +213,7 @@ void X11Factory::rmDir( const string &rPath )
...
@@ -208,7 +213,7 @@ void X11Factory::rmDir( const string &rPath )
if
(
!
dir
)
return
;
if
(
!
dir
)
return
;
// Parse the directory and remove everything it contains
// 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
;
struct
stat
statbuf
;
string
filename
=
file
->
d_name
;
string
filename
=
file
->
d_name
;
...
@@ -221,7 +226,7 @@ void X11Factory::rmDir( const string &rPath )
...
@@ -221,7 +226,7 @@ void X11Factory::rmDir( const string &rPath )
filename
=
rPath
+
"/"
+
filename
;
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
);
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