[vlc-devel] [PATCH] demux/avi: remove short ternary which is a GNU extension

Hugo Beauzée-Luyssen hugo at beauzee.fr
Wed Jul 17 13:00:24 CEST 2019


On Wed, Jul 17, 2019, at 12:58 PM, Hugo Beauzée-Luyssen wrote:
> Yes please!
> 
> On Wed, Jul 17, 2019, at 10:51 AM, Marvin Scholz wrote:
> > ---
> >  modules/demux/avi/bitmapinfoheader.h | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/modules/demux/avi/bitmapinfoheader.h 
> > b/modules/demux/avi/bitmapinfoheader.h
> > index 9a88fffdef..e1ccca9722 100644
> > --- a/modules/demux/avi/bitmapinfoheader.h
> > +++ b/modules/demux/avi/bitmapinfoheader.h
> > @@ -246,7 +246,8 @@ static inline VLC_BITMAPINFOHEADER * 
> > CreateBitmapInfoHeader( const es_format_t *
> >              biCompression = VLC_FOURCC( 'X', 'V', 'I', 'D' );
> >              break;
> >          default:
> > -            biCompression = fmt->i_original_fourcc ?: fmt->i_codec;
> > +            biCompression = (fmt->i_original_fourcc)
> > +                ? fmt->i_original_fourcc : fmt->i_codec;

However, why the extra parenthesis?

-- 
  Hugo Beauzée-Luyssen
  hugo at beauzee.fr


More information about the vlc-devel mailing list