[vlc-devel] commit: We don't need size here to check asprintf value. ( Rémi Duraffort )
git version control
git at videolan.org
Wed Aug 13 20:13:00 CEST 2008
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Wed Aug 13 20:09:34 2008 +0200| [645d57755012c0a767a4b1f3ac50d5fd9fcae3c9] | committer: Rémi Duraffort
We don't need size here to check asprintf value.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=645d57755012c0a767a4b1f3ac50d5fd9fcae3c9
---
src/modules/cache.c | 8 ++++----
src/osd/osd_text.c | 1 -
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/modules/cache.c b/src/modules/cache.c
index 538e8a2..dc7ed96 100644
--- a/src/modules/cache.c
+++ b/src/modules/cache.c
@@ -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 )
{
diff --git a/src/osd/osd_text.c b/src/osd/osd_text.c
index 914b75a..fc878fc 100644
--- a/src/osd/osd_text.c
+++ b/src/osd/osd_text.c
@@ -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 );
More information about the vlc-devel
mailing list