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
33e389f4
Commit
33e389f4
authored
May 10, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove useless checks
parent
eadca52d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
10 deletions
+2
-10
modules/misc/playlist/xspf.c
modules/misc/playlist/xspf.c
+2
-10
No files found.
modules/misc/playlist/xspf.c
View file @
33e389f4
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
static
void
xspf_export_item
(
playlist_item_t
*
,
FILE
*
,
int
*
);
static
void
xspf_export_item
(
playlist_item_t
*
,
FILE
*
,
int
*
);
static
void
xspf_extension_item
(
playlist_item_t
*
,
FILE
*
,
int
*
);
static
void
xspf_extension_item
(
playlist_item_t
*
,
FILE
*
,
int
*
);
static
char
*
assertUTF8URI
(
char
*
);
static
char
*
assertUTF8URI
(
c
onst
c
har
*
);
/**
/**
* \brief Prints the XSPF header to file, writes each item by xspf_export_item()
* \brief Prints the XSPF header to file, writes each item by xspf_export_item()
...
@@ -296,20 +296,12 @@ static void xspf_extension_item( playlist_item_t *p_item, FILE *p_file,
...
@@ -296,20 +296,12 @@ static void xspf_extension_item( playlist_item_t *p_item, FILE *p_file,
* and a valid URI
* and a valid URI
* \note the returned buffer must be freed, when it isn't used anymore
* \note the returned buffer must be freed, when it isn't used anymore
*/
*/
static
char
*
assertUTF8URI
(
char
*
psz_name
)
static
char
*
assertUTF8URI
(
c
onst
c
har
*
psz_name
)
{
{
char
*
psz_ret
=
NULL
;
/**< the new result buffer to return */
char
*
psz_ret
=
NULL
;
/**< the new result buffer to return */
char
*
psz_s
=
NULL
,
*
psz_d
=
NULL
;
/**< src & dest pointers for URI conversion */
char
*
psz_s
=
NULL
,
*
psz_d
=
NULL
;
/**< src & dest pointers for URI conversion */
bool
b_uri_is_file
=
false
;
/**< we do additional %-encoding if the URI is a file:// one */
bool
b_uri_is_file
=
false
;
/**< we do additional %-encoding if the URI is a file:// one */
if
(
!
psz_name
||
!*
psz_name
)
return
NULL
;
/* check that string is valid UTF-8 */
/* XXX: Why do we even need to do that ? (all strings in core are UTF-8 encoded */
if
(
!
(
psz_s
=
EnsureUTF8
(
psz_name
)
)
)
return
NULL
;
/* max. 3x for URI conversion (percent escaping) and
/* max. 3x for URI conversion (percent escaping) and
8 bytes for "file://" and NULL-termination */
8 bytes for "file://" and NULL-termination */
psz_ret
=
(
char
*
)
malloc
(
strlen
(
psz_name
)
*
6
*
3
+
8
);
psz_ret
=
(
char
*
)
malloc
(
strlen
(
psz_name
)
*
6
*
3
+
8
);
...
...
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