Changeset 234fc4e33a5edca0b10e25f2ab47aafd484994c4

Show
Ignore:
Timestamp:
19/08/07 18:53:34 (1 year ago)
Author:
Rémi Denis-Courmont <rem@videolan.org>
git-committer:
Rémi Denis-Courmont <rem@videolan.org> 1187542414 +0000
git-parent:

[8c4e67276bf8c1ebe672f4cc1d6d25a2b3c6231d]

git-author:
Rémi Denis-Courmont <rem@videolan.org> 1187542414 +0000
Message:

Fix use of undefined variable

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/misc/messages.c

    r8c4e672 r234fc4e  
    308308#if defined(HAVE_VASPRINTF) && !defined(__APPLE__) && !defined( SYS_BEOS ) 
    309309    vlc_va_copy( args, _args ); 
    310     vasprintf( &psz_str, psz_format, args ); 
     310    if( vasprintf( &psz_str, psz_format, args ) == -1 ) 
     311        psz_str = NULL; 
    311312    va_end( args ); 
    312313#else 
     
    600601    msg_context_t *p_ctx = GetContext(); 
    601602    assert( p_ctx ); 
     603 
    602604    va_start( ap, psz_message ); 
    603     if( p_ctx->psz_message != NULL ) 
    604     { 
    605         free( p_ctx->psz_message ); 
    606     } 
    607  
    608     vasprintf( &p_ctx->psz_message, psz_message, ap ); 
     605    free( p_ctx->psz_message ); 
     606 
     607    if( vasprintf( &p_ctx->psz_message, psz_message, ap ) == -1 ) 
     608        p_ctx->psz_message = NULL; 
    609609    va_end( ap ); 
     610 
    610611    p_ctx->i_code = i_code; 
    611612} 
     
    619620 
    620621    va_start( ap, psz_message ); 
    621     vasprintf( &psz_tmp, psz_message, ap ); 
     622    if( vasprintf( &psz_tmp, psz_message, ap ) == -1 ) 
     623        psz_tmp = NULL; 
    622624    va_end( ap ); 
    623625