[vlc-devel] commit: Remove xurl_(free|malloc) ( Rémi Duraffort )

git version control git at videolan.org
Wed Oct 1 22:06:02 CEST 2008


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Wed Oct  1 22:05:36 2008 +0200| [d7fb424d8044a7698cf44e5237eeb8ff22a138f2] | committer: Rémi Duraffort 

Remove xurl_(free|malloc)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d7fb424d8044a7698cf44e5237eeb8ff22a138f2
---

 modules/codec/cmml/xurl.c |   14 +++++++-------
 modules/codec/cmml/xurl.h |    4 ----
 2 files changed, 7 insertions(+), 11 deletions(-)

diff --git a/modules/codec/cmml/xurl.c b/modules/codec/cmml/xurl.c
index fabf40c..ef92894 100644
--- a/modules/codec/cmml/xurl.c
+++ b/modules/codec/cmml/xurl.c
@@ -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;
diff --git a/modules/codec/cmml/xurl.h b/modules/codec/cmml/xurl.h
index 9a57b00..77153e0 100644
--- a/modules/codec/cmml/xurl.h
+++ b/modules/codec/cmml/xurl.h
@@ -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




More information about the vlc-devel mailing list