[vlc-devel] commit: Fix compiler warning about asprintf return value. ( Rémi Duraffort )
git version control
git at videolan.org
Fri Aug 1 23:04:35 CEST 2008
vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Fri Aug 1 23:07:16 2008 +0200| [132030acbbe9d9d69bed8e1382515a0060e9bf45] | committer: Rémi Duraffort
Fix compiler warning about asprintf return value.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=132030acbbe9d9d69bed8e1382515a0060e9bf45
---
modules/demux/flac.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/modules/demux/flac.c b/modules/demux/flac.c
index 86a81fb..d2fc039 100644
--- a/modules/demux/flac.c
+++ b/modules/demux/flac.c
@@ -620,7 +620,8 @@ static void ParseComment( demux_t *p_demux, const uint8_t *p_data, int i_data )
if( oldval ) \
{ \
char * newval; \
- asprintf( &newval, "%s,%s", oldval, &psz[strlen(txt)] ); \
+ if( asprintf( &newval, "%s,%s", oldval, &psz[strlen(txt)] ) == -1 ) \
+ newval = NULL; \
vlc_meta_Set( p_sys->p_meta, vlc_meta_ ## var, newval ); \
free( newval ); \
} \
More information about the vlc-devel
mailing list