[vlc-devel] [PATCH 2/6] preparser: force initialization of b_preparse_interact
Alexandre Janniaux
ajanni at videolabs.io
Wed Dec 4 15:36:41 CET 2019
Hi,
On Wed, Dec 04, 2019 at 03:13:31PM +0100, Romain Vimont wrote:
>
>
> On 12/3/19 5:02 PM, Alexandre Janniaux wrote:
> > b_preparse_interact is only initialized here and has no default value,
> > so it needs to be initialized here even when the flag is not present.
> > ---
> > src/preparser/preparser.c | 3 +--
> > 1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/src/preparser/preparser.c b/src/preparser/preparser.c
> > index 723feb96dc..4564026a37 100644
> > --- a/src/preparser/preparser.c
> > +++ b/src/preparser/preparser.c
> > @@ -268,8 +268,7 @@ void input_preparser_Push( input_preparser_t *preparser,
> > vlc_mutex_lock( &item->lock );
> > enum input_item_type_e i_type = item->i_type;
> > int b_net = item->b_net;
> > - if( i_options & META_REQUEST_OPTION_DO_INTERACT )
> > - item->b_preparse_interact = true;
> > + item->b_preparse_interact = i_options & META_REQUEST_OPTION_DO_INTERACT;
>
> b_preparse_interact is a bool, so it's maybe better to force the value to be
> 0 or 1:
>
> item->b_preparse_interact =
> (i_options & META_REQUEST_OPTION_DO_INTERACT) != 0;
Thanks, I'll fix this in the two related patches.
>
> > vlc_mutex_unlock( &item->lock );
> > switch( i_type )
> >
Regards,
--
Alexandre Janniaux
Videolabs
More information about the vlc-devel
mailing list