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

Clément Bœsch ubitux at gmail.com
Thu Nov 4 22:01:46 CET 2010


On Thu, Nov 04, 2010 at 07:54:11AM +0100, Reimar Döffinger wrote:
> On Thu, Nov 04, 2010 at 04:06:09AM +0100, Clément Bœsch wrote:
> > I've removed a lot of "if(p) free(p)" form in MPlayer files. There are 33
> > files modified (from root, sub and stream directories). I hope this patch
> > is fine. If one single patch is not good, I've also the patch split in 33
> > files.
> 
> > -    if(entries[num].title) {
> > -      // When we have info in playtree we add this info
> > -      free(entries[num].title);
> > -    }
> > -    if(entries[num].length) {
> > -      // When we have info in playtree we add this info
> > -      free(entries[num].length);
> > -    }
> > +    free(entries[num].title);  // When we have info in playtree we add this info
> > +    free(entries[num].length); // When we have info in playtree we add this info
> 
> I don't like that you moved the comment, resulting in overlong lines.
> That is of course besides the fact that it is twice the same comment
> and both are incomprehensible to me which is not your fault.
> But otherwise I guess it's ok.

Is this version ok with you?

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


More information about the MPlayer-dev-eng mailing list