mirror of
https://github.com/mpv-player/mpv
synced 2025-01-19 05:41:16 +00:00
Removed the url_copy function , since it was badly implemented,
and a url_new can do the job. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4654 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
e1d2cd594d
commit
848c35b252
@ -19,6 +19,8 @@ url_new(char* url) {
|
||||
URL_t* Curl;
|
||||
char *ptr1, *ptr2, *ptr3;
|
||||
|
||||
if( url==NULL ) return NULL;
|
||||
|
||||
// Create the URL container
|
||||
Curl = (URL_t*)malloc(sizeof(URL_t));
|
||||
if( Curl==NULL ) {
|
||||
@ -105,22 +107,6 @@ url_new(char* url) {
|
||||
return Curl;
|
||||
}
|
||||
|
||||
URL_t *
|
||||
url_copy(URL_t* url) {
|
||||
URL_t *dup_url;
|
||||
|
||||
if( url==NULL ) return NULL;
|
||||
dup_url = (URL_t*)malloc(sizeof(URL_t));
|
||||
if( dup_url==NULL ) {
|
||||
printf("Memory allocation failed!\n");
|
||||
return NULL;
|
||||
}
|
||||
memcpy( dup_url, url, sizeof(URL_t) );
|
||||
|
||||
return dup_url;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
url_free(URL_t* url) {
|
||||
if(!url) return;
|
||||
|
@ -20,7 +20,6 @@ typedef struct {
|
||||
} URL_t;
|
||||
|
||||
URL_t* url_new(char* url);
|
||||
URL_t* url_copy(URL_t* url);
|
||||
void url_free(URL_t* url);
|
||||
|
||||
void url_unescape_string(char *outbuf, char *inbuf);
|
||||
|
Loading…
Reference in New Issue
Block a user