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

Clément Bœsch ubitux at gmail.com
Sun Nov 7 18:01:49 CET 2010


On Sun, Nov 07, 2010 at 05:55:40PM +0100, Reimar Döffinger wrote:
> 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.

Yes sorry about that, but since the line needed to be moved, i thought
making it much more explicit about the fact it was a pointer wasn't
harmless.

-- 
Clément B.
Not sent from a jesusPhone.


More information about the MPlayer-dev-eng mailing list