]> git.sesse.net Git - vlc/commitdiff
asprintf -> strdup
authorRémi Denis-Courmont <remi@remlab.net>
Sun, 3 Jan 2010 14:56:58 +0000 (16:56 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Sun, 3 Jan 2010 14:56:58 +0000 (16:56 +0200)
extras/analyser/zsh.cpp
modules/demux/playlist/playlist.c
modules/misc/notify/growl.m

index 4f432fac5a14b7ec66f4c4e15ac1d39aa3001d2d..e5b10fa9f14c57aaca86e40de2f43e4733d494db 100644 (file)
@@ -257,7 +257,7 @@ void ParseOption( module_config_t *p_item, mumap &mods, mcmap &mods2 )
             list = list.append( "'" );
             ++range.first;
         }
-        asprintf( &psz_arguments, "%s", list.c_str() );
+        psz_arguments = strdup( list.c_str() );
     }
     break;
 
index c02c186b3377b989109a6ba5cb8ca10134b54622..f6ea8921b358e8400984198c16230174dd15e3fe 100644 (file)
@@ -192,7 +192,8 @@ char *FindPrefix( demux_t *p_demux )
     }
     else
     {
-        if( asprintf( &psz_path,"%s", p_demux->psz_path ) == -1 )
+        psz_path = strdup( p_demux->psz_path );
+        if( psz_path == NULL )
             return NULL;
     }
 
index 575739f24881571e7148919a9af525f523c64d6b..319c7ebe275b928ea3232e0eb02a9939fddeed0c 100644 (file)
@@ -198,7 +198,11 @@ static int ItemChange( vlc_object_t *p_this, const char *psz_var,
     else if( psz_artist )
         i_ret = asprintf( &psz_tmp, "%s\n%s", psz_title, psz_artist );
     else
-        i_ret = asprintf( &psz_tmp, "%s", psz_title );
+    {
+        psz_tmp = strdup( psz_title );
+        if( psz_tmp == NULL )
+           i_ret = -1;
+    }
 
     if( i_ret == -1 )
     {