On Mon, 13 Jun 2011, Greg Dietsche wrote: > Hi Derek :) > > On 06/13/2011 05:38 PM, Derek M Jones wrote: > > Greg, > > > > > 1) sometimes you see this type of code - which i've chosen to ignore for > > > now: > > > if ((ret=XXXXX) < 0) > > > return ret; > > > return ret; > > > > I'm surprised you are interested in special casing what is already > > a relatively rare special case. Of the 17 instances of > > I'm on vacation, so this is more for fun and also so that I can learn more > about Coccinelle :) You are right though... and your reasoning is > also why I've been leaving these cases alone to date. If I do tackle this > problem, it will be more for the academic challenge than anything else.
It could be worthwhile to inform the user about cases with a function call in the test expression. The pattern above would probably be much clearer as just return XXXX; julia _______________________________________________ Cocci mailing list [email protected] http://lists.diku.dk/mailman/listinfo/cocci (Web access from inside DIKUs LAN only)
