Matt Turner <[email protected]> (10/11/2010): > And good grief. Has anyone kept count of how many various incarnations > of this patch there have been? > > if (p) free(p); > if (p != NULL) free(p); > then with { } > then add p = NULL or p = 0. > > Is it possible to write a coccinelle patch to catch all of these cases?
Sorry, I've just started using coccinelle. I guess I could build a “definitive” patch with all combinations we could think of and keep that somewhere so that it can be run from time to time; but AFAICT people like minimal changes at a time (though I understand that conceptually we're just getting rid of extra conditionals, no matter how they're written), that's why I went from trivial changes to slightly less trivial changes. Mraw, KiBi.
signature.asc
Description: Digital signature
_______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
