[vlc-devel] [PATCH 02/10] MED Support - Core controls and definitons

Rémi Denis-Courmont remi at remlab.net
Sun Apr 6 13:14:22 CEST 2014


Le dimanche 6 avril 2014, 09:18:34 Francois Cartegnie a écrit :
> Le 04/04/2014 20:07, Roiy Shpaner a écrit :
> 
> Just about code style.
> 
> > +    int64_t i_time_duration;
> > +    char    *psz_layerName;
> > +    int     eventNum;
> > +    char    *psz_text;
> > +    int     i_layer_id;
> 
> missing code convention for int.
> 
> > +static inline void vlc_seeksegment_Clear( seeksegment_t *segment )
> > +{
> > +    if( !segment ) return;
> 
> p_segment
> many many

I disagree. That's the old (abd broken) convention. We have plenty of code not 
using (and not only written by me).

> 
> > +
> > +    free( segment->psz_layerName );
> > +    free( segment->psz_text );
> > +
> > +    segment->psz_layerName = NULL;
> > +    segment->psz_text = NULL;
> > +}
> 
> FREENULL macro

That macro is evil. Don't use it. The current code is actually better both for 
humans and compilers.

> > @@ -66,14 +68,17 @@ int input_vaControl( input_thread_t *p_input, int
> > i_query, va_list args )> 
> >      int i_bkmk = 0;
> >      int *pi_bkmk;
> > 
> > -    int i_int, *pi_int;
> > +    seeksegment_t *p_segment, ***p_segments;
> 
> *** == ppp. Notation again ! many places.

Better yet no p's.

-- 
Rémi Denis-Courmont
http://www.remlab.net/




More information about the vlc-devel mailing list