diff options
author | bertrand <bertrand@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-02-11 05:19:11 +0000 |
---|---|---|
committer | bertrand <bertrand@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-02-11 05:19:11 +0000 |
commit | 848c35b252ebfff3d8789dba19987a25d8a5fc6d (patch) | |
tree | fb64bc02923f9f176b4bbabec82cc6d4cfbba9e3 /libmpdemux | |
parent | e1d2cd594dce0403a3e50c40b6c98a72f683787f (diff) |
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
Diffstat (limited to 'libmpdemux')
-rw-r--r-- | libmpdemux/url.c | 18 | ||||
-rw-r--r-- | libmpdemux/url.h | 1 |
2 files changed, 2 insertions, 17 deletions
diff --git a/libmpdemux/url.c b/libmpdemux/url.c index 5a13513076..a8c6fd064c 100644 --- a/libmpdemux/url.c +++ b/libmpdemux/url.c @@ -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; diff --git a/libmpdemux/url.h b/libmpdemux/url.h index 6679d97501..9ec7bf3152 100644 --- a/libmpdemux/url.h +++ b/libmpdemux/url.h @@ -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); |