[PATCH libxkbcommon 08/11] Fix all constness warnings

Ran Benita ran234 at gmail.com
Tue Feb 28 11:15:52 PST 2012


On Tue, Feb 28, 2012 at 07:04:31PM +0000, Daniel Stone wrote:
> Hi,
> 
> On 28 February 2012 18:27, Ran Benita <ran234 at gmail.com> wrote:
> > Running the following semantic patch:
> >
> > @@
> > expression E;
> > @@
> > - if (E != NULL)
> > -     free(E);
> > + free(E);
> >
> > Gives this:
> > [...]
> >
> > And probably doesn't catch all of them. So maybe I can send this as a
> > separate patch later?
> 
> Yes, please, that'd be fine.  You might also want to add if (!E) to your checks.

It handles this on its own (I think there's a file with these isomorphisms).

> Cheers,
> Daniel


More information about the xorg-devel mailing list