0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02: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:
bertrand 2002-02-11 05:19:11 +00:00
parent e1d2cd594d
commit 848c35b252
2 changed files with 2 additions and 17 deletions

View File

@ -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;

View File

@ -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);