[Mplayer-cvslog] CVS: main/libmpdemux url.h,1.6,1.7 url.c,1.12,1.13

Bertrand Baudet bertrand at mplayer.dev.hu
Mon Feb 11 06:19:14 CET 2002


Update of /cvsroot/mplayer/main/libmpdemux
In directory mplayer:/var/tmp.root/cvs-serv23935

Modified Files:
	url.h url.c 
Log Message:
Removed the url_copy function , since it was badly implemented, 
and a url_new can do the job.


Index: url.h
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/url.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- url.h	12 Jan 2002 21:02:00 -0000	1.6
+++ url.h	11 Feb 2002 05:19:11 -0000	1.7
@@ -20,7 +20,6 @@
 } 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);

Index: url.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/url.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- url.c	12 Jan 2002 21:02:00 -0000	1.12
+++ url.c	11 Feb 2002 05:19:11 -0000	1.13
@@ -19,6 +19,8 @@
 	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 ) {
@@ -104,22 +106,6 @@
 	
 	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) {




More information about the MPlayer-cvslog mailing list