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
d7fb424d
Commit
d7fb424d
authored
Oct 01, 2008
by
Rémi Duraffort
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove xurl_(free|malloc)
parent
43095a4d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
11 deletions
+7
-11
modules/codec/cmml/xurl.c
modules/codec/cmml/xurl.c
+7
-7
modules/codec/cmml/xurl.h
modules/codec/cmml/xurl.h
+0
-4
No files found.
modules/codec/cmml/xurl.c
View file @
d7fb424d
...
...
@@ -201,7 +201,7 @@ char *XURL_GetHostname( char *psz_url )
}
/* Copy hostname to a new string */
psz_new_hostname
=
xurl_
malloc
(
i_hostname_length
);
psz_new_hostname
=
malloc
(
i_hostname_length
);
if
(
psz_new_hostname
==
NULL
)
return
NULL
;
strncpy
(
psz_new_hostname
,
psz_hostname
,
i_hostname_length
);
...
...
@@ -232,7 +232,7 @@ char *XURL_GetSchemeAndHostname( char *psz_url )
if
(
psz_hostname
==
NULL
)
return
NULL
;
/* malloc +1 for the terminating '\0' */
psz_scheme_and_hostname
=
xurl_
malloc
(
psz_scheme_and_hostname
=
malloc
(
strlen
(
psz_scheme
)
+
strlen
(
"://"
)
+
strlen
(
psz_hostname
)
+
1
);
if
(
psz_scheme_and_hostname
==
NULL
)
return
NULL
;
...
...
@@ -240,7 +240,7 @@ char *XURL_GetSchemeAndHostname( char *psz_url )
strcat
(
psz_scheme_and_hostname
,
"://"
);
strcat
(
psz_scheme_and_hostname
,
psz_hostname
);
if
(
psz_scheme_and_hostname
==
NULL
)
return
NULL
;
if
(
psz_scheme_and_hostname
==
NULL
)
return
NULL
;
return
psz_scheme_and_hostname
;
}
...
...
@@ -288,7 +288,7 @@ char *XURL_GetScheme( char *psz_url )
i_scheme_length
=
psz_colon
-
psz_url
;
new_scheme
=
xurl_
malloc
(
i_scheme_length
);
new_scheme
=
malloc
(
i_scheme_length
);
if
(
new_scheme
==
NULL
)
return
NULL
;
strncpy
(
new_scheme
,
psz_url
,
i_scheme_length
);
...
...
@@ -307,7 +307,7 @@ XURL_Bool XURL_IsFileURL( char *psz_url )
else
b_return_value
=
XURL_FALSE
;
xurl_
free
(
psz_scheme
);
free
(
psz_scheme
);
return
b_return_value
;
}
...
...
@@ -322,7 +322,7 @@ char *xurl_strdup( const char *psz_string )
if
(
!
psz_string
)
return
NULL
;
i_length
=
strlen
(
psz_string
)
+
1
;
psz_new_string
=
(
char
*
)
xurl_
malloc
(
i_length
);
psz_new_string
=
(
char
*
)
malloc
(
i_length
);
if
(
psz_new_string
==
NULL
)
return
NULL
;
memcpy
(
psz_new_string
,
psz_string
,
i_length
);
...
...
@@ -458,7 +458,7 @@ char *XURL_GetWithoutFragment( char *psz_url )
i_pre_fragment_length
=
psz_fragment
-
psz_url
;
psz_without_fragment
=
xurl_
malloc
(
i_pre_fragment_length
+
1
);
psz_without_fragment
=
malloc
(
i_pre_fragment_length
+
1
);
if
(
psz_without_fragment
==
NULL
)
{
psz_return_value
=
NULL
;
...
...
modules/codec/cmml/xurl.h
View file @
d7fb424d
...
...
@@ -34,10 +34,6 @@ typedef bool XURL_Bool;
#define XURL_FALSE false
#define XURL_TRUE true
/* Specialise general C functions to VLC's standards */
#define xurl_malloc malloc
#define xurl_free free
/* Use DOS/Windows path separators? */
#ifdef WIN32
# define XURL_WIN32_PATHING
...
...
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