]> git.sesse.net Git - vlc/commitdiff
We don't need size here to check asprintf value.
authorRémi Duraffort <ivoire@videolan.org>
Wed, 13 Aug 2008 18:09:34 +0000 (20:09 +0200)
committerRémi Duraffort <ivoire@videolan.org>
Wed, 13 Aug 2008 18:15:46 +0000 (20:15 +0200)
src/modules/cache.c
src/osd/osd_text.c

index 538e8a2bd85cc0f95390769412c01dcb0776a3db..dc7ed9664b26a12367bfe2716c35495ed37737eb 100644 (file)
@@ -113,13 +113,13 @@ void CacheLoad( vlc_object_t *p_this )
         return;
     }
 
-    i_size = asprintf( &psz_filename, "%s"DIR_SEP"%s",
-                       psz_cachedir, CacheName() );
-    free( psz_cachedir );
-    if( i_size <= 0 )
+    if( asprintf( &psz_filename, "%s"DIR_SEP"%s",
+                       psz_cachedir, CacheName() == -1 ) )
     {
+        free( psz_cachedir );
         return;
     }
+    free( psz_cachedir );
 
     if( p_libvlc_global->p_module_bank->b_cache_delete )
     {
index 914b75a5e7fb6b016a97178d54c20d6a2d35f2f7..fc878fc37b6e4bc40e323041be8568174c58154b 100644 (file)
@@ -131,7 +131,6 @@ void osd_Message( spu_t *p_spu, int i_channel,
         va_start( args, psz_format );
         if( vasprintf( &psz_string, psz_format, args ) != -1 )
         {
-
             osd_ShowTextRelative( p_spu, i_channel, psz_string, NULL,
                     OSD_ALIGN_TOP|OSD_ALIGN_RIGHT, 30,20,1000000 );