[Cocci] Remove unnecessary null pointer checks?
SF Markus Elfring
elfring at users.sourceforge.net
Mon Feb 24 17:34:49 CET 2014
> I'm not sure what is the point of the if (input) is else es pattern.
Now it seems that I added it because of too few considerations for isomorphisms.
> I would think you only want to find cases where the function does nothing
> until it tests input and aborts the function is the value is 0. So you
> only want the return case. Before it, you would want
> ... when != S
> where S is a statement typed metavariable. That way the ... will only
> match declarations.
We have got different expectations about the amount of source code before the
statement "return". A bit more fine-tuning with the SmPL construct "when" might
be needed to achieve further constraints.
More information about the Cocci