Changeset 2dd113c61fb9fb15f3d1ef4652412ee51e132f55

Show
Ignore:
Timestamp:
13/08/08 01:15:50 (4 months ago)
Author:
Pierre d'Herbemont <pdherbemont@videolan.org>
git-committer:
Pierre d'Herbemont <pdherbemont@videolan.org> 1218582950 +0200
git-parent:

[5b15b230d318ee37379cd9468f2c1e3af8e06fd8]

git-author:
Pierre d'Herbemont <pdherbemont@videolan.org> 1218582940 +0200
Message:

input: Fix asprintf usage.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/input/es_out.c

    rb2fcbc3 r2dd113c  
    670670    char *psz = NULL; 
    671671    if( p_pgrm->psz_name ) 
    672         asprintf( &psz, _("%s [%s %d]"), p_pgrm->psz_name, _("Program"), p_pgrm->i_id ); 
     672    { 
     673        if( asprintf( &psz, _("%s [%s %d]"), p_pgrm->psz_name, _("Program"), p_pgrm->i_id ) == -1 ) 
     674            psz = NULL; 
     675    } 
    673676    else 
    674         asprintf( &psz, "%s %d", _("Program"), p_pgrm->i_id ); 
     677    { 
     678        if( asprintf( &psz, "%s %d", _("Program"), p_pgrm->i_id ) == -1 ) 
     679            psz = NULL; 
     680    } 
    675681    return psz; 
    676682} 
     
    736742        if( psz_provider && *psz_provider ) 
    737743        { 
    738             asprintf( &text.psz_string, "%s [%s]", psz_title, psz_provider ); 
    739             var_Change( p_input, "program", VLC_VAR_ADDCHOICE, &val, &text ); 
    740             free( text.psz_string ); 
     744            if( asprintf( &text.psz_string, "%s [%s]", psz_title, psz_provider ) != -1 ) 
     745            { 
     746                var_Change( p_input, "program", VLC_VAR_ADDCHOICE, &val, &text ); 
     747                free( text.psz_string ); 
     748            } 
    741749        } 
    742750        else 
     
    20362044 
    20372045    /* Add stream info */ 
    2038     asprintf( &psz_cat, _("Stream %d"), out->p_sys->i_id - 1 ); 
     2046    if( asprintf( &psz_cat, _("Stream %d"), out->p_sys->i_id - 1 ) == -1 ) 
     2047        return; 
    20392048 
    20402049    input_Control( p_input, INPUT_ADD_INFO, psz_cat, _("Codec"),