Commit bb8a0acc authored by Rémi Duraffort's avatar Rémi Duraffort

factorize.

parent 9dd8eab9
...@@ -927,10 +927,9 @@ static void EsOutESVarUpdateGeneric( es_out_t *out, int i_id, ...@@ -927,10 +927,9 @@ static void EsOutESVarUpdateGeneric( es_out_t *out, int i_id,
{ {
if( psz_language && *psz_language ) if( psz_language && *psz_language )
{ {
text.psz_string = malloc( strlen( fmt->psz_description) + if( asprintf( &text.psz_string, "%s - [%s]", fmt->psz_description,
strlen( psz_language ) + 10 ); psz_language ) == -1 )
sprintf( text.psz_string, "%s - [%s]", fmt->psz_description, text.psz_string = NULL;
psz_language );
} }
else text.psz_string = strdup( fmt->psz_description ); else text.psz_string = strdup( fmt->psz_description );
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment