Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
4a9766d2
Commit
4a9766d2
authored
Aug 24, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
filesystem: constify vlc_readdir()
parent
3244a744
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
5 deletions
+6
-5
include/vlc_fs.h
include/vlc_fs.h
+1
-1
src/modules/bank.c
src/modules/bank.c
+2
-1
src/os2/filesystem.c
src/os2/filesystem.c
+1
-1
src/posix/filesystem.c
src/posix/filesystem.c
+1
-1
src/win32/filesystem.c
src/win32/filesystem.c
+1
-1
No files found.
include/vlc_fs.h
View file @
4a9766d2
...
...
@@ -173,7 +173,7 @@ VLC_API DIR *vlc_opendir(const char *dirname) VLC_USED;
* If there are no more entries in the directory, NULL is returned.
* If an error occurs, errno is set and NULL is returned.
*/
VLC_API
char
*
vlc_readdir
(
DIR
*
dir
)
VLC_USED
;
VLC_API
c
onst
c
har
*
vlc_readdir
(
DIR
*
dir
)
VLC_USED
;
VLC_API
int
vlc_loaddir
(
DIR
*
dir
,
char
***
namelist
,
int
(
*
select
)(
const
char
*
),
int
(
*
compar
)(
const
char
**
,
const
char
**
)
);
VLC_API
int
vlc_scandir
(
const
char
*
dirname
,
char
***
namelist
,
int
(
*
select
)(
const
char
*
),
int
(
*
compar
)(
const
char
**
,
const
char
**
)
);
...
...
src/modules/bank.c
View file @
4a9766d2
...
...
@@ -439,7 +439,8 @@ static void AllocatePluginDir (module_bank_t *bank, unsigned maxdepth,
/* Parse the directory and try to load all files it contains. */
for
(;;)
{
char
*
file
=
vlc_readdir
(
dh
),
*
relpath
=
NULL
,
*
abspath
=
NULL
;
char
*
relpath
=
NULL
,
*
abspath
=
NULL
;
const
char
*
file
=
vlc_readdir
(
dh
);
if
(
file
==
NULL
)
break
;
...
...
src/os2/filesystem.c
View file @
4a9766d2
...
...
@@ -109,7 +109,7 @@ DIR *vlc_opendir (const char *dirname)
return
dir
;
}
c
har
*
vlc_readdir
(
DIR
*
dir
)
c
onst
char
*
vlc_readdir
(
DIR
*
dir
)
{
/* Beware that readdir_r() assumes <buf> is large enough to hold the result
* dirent including the file name. A buffer overflow could occur otherwise.
...
...
src/posix/filesystem.c
View file @
4a9766d2
...
...
@@ -107,7 +107,7 @@ DIR *vlc_opendir (const char *dirname)
return
opendir
(
dirname
);
}
c
har
*
vlc_readdir
(
DIR
*
dir
)
c
onst
char
*
vlc_readdir
(
DIR
*
dir
)
{
struct
dirent
*
ent
=
readdir
(
dir
);
return
(
ent
!=
NULL
)
?
ent
->
d_name
:
NULL
;
...
...
src/win32/filesystem.c
View file @
4a9766d2
...
...
@@ -169,7 +169,7 @@ DIR *vlc_opendir (const char *dirname)
return
(
void
*
)
p_dir
;
}
char
*
vlc_readdir
(
DIR
*
dir
)
c
onst
c
har
*
vlc_readdir
(
DIR
*
dir
)
{
vlc_DIR
*
p_dir
=
(
vlc_DIR
*
)
dir
;
...
...
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