[vlc-devel] [PATCH 01/19] ttml demux: add style inheritence support

Denis Charmet typx at dinauz.org
Mon Aug 29 19:02:30 CEST 2016


On 2016-08-29 18:17, Denis Charmet wrote:
>> +static int MergeStyles(char** pp_dest, char* p_src)
>> +{
>> +    if( p_src )
>> +    {
>> +        char *p_tmp = NULL;
>> +        if( asprintf( &p_tmp, "%s %s", p_src, *pp_dest ) < 0 )
>> +            return VLC_ENOMEM;
>> +
>> +        free( *pp_dest );
>> +        *pp_dest = p_tmp;
>> +    }
>> +    return VLC_SUCCESS;
> 
> if it cannot fail I'd rather see that function as void and avoid the
> subsequent test.
> 

Next time I'll read that more carefully. Of course it can fail 
nevermind. :)

Regards,
-- 
Denis Charmet - TypX
Le mauvais esprit est un art de vivre


More information about the vlc-devel mailing list