[MPlayer-dev-eng] [PATCH] Remove a bunch of useless if NULL before free

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sun Nov 7 17:55:40 CET 2010


On Sun, Nov 07, 2010 at 01:45:31PM +0100, Diego Biurrun wrote:
> On Thu, Nov 04, 2010 at 10:01:46PM +0100, Clément Bœsch wrote:
> > Is this version ok with you?
> > 
> > --- a/stream/tvi_v4l.c
> > +++ b/stream/tvi_v4l.c
> > @@ -702,10 +700,8 @@ static int uninit(priv_t *priv)
> >  
> > -    if(priv->vbi_dev){
> > -        free(priv->vbi_dev);
> > -        priv->vbi_dev=0;
> > -    }
> > +    free(priv->vbi_dev);
> > +    priv->vbi_dev = NULL;
> 
> Was this 0 --> NULL change done on purpose?

I'm pretty sure it was. Strictly speaking it cosmetic only,
but to a degree so is the whole patch.


More information about the MPlayer-dev-eng mailing list