]> git.sesse.net Git - vlc/commitdiff
Remove xurl_(free|malloc)
authorRémi Duraffort <ivoire@videolan.org>
Wed, 1 Oct 2008 20:05:36 +0000 (22:05 +0200)
committerRémi Duraffort <ivoire@videolan.org>
Wed, 1 Oct 2008 20:05:36 +0000 (22:05 +0200)
modules/codec/cmml/xurl.c
modules/codec/cmml/xurl.h

index fabf40c2d0b42ed5c38cc643a2997f20f394ad9d..ef928942e1c3d9d2383f87c88407a9ebd214ba4d 100644 (file)
@@ -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;
+    ifpsz_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;
index 9a57b00bc4f250a3f0a00be114452bdf9f24598f..77153e053d7ce7f0ae72e59c1539e8d225e9975c 100644 (file)
@@ -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