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 if (cond) return ret; return ret; I have found 50% of them included a function call in cond. I would be more inclined to flag this usage as being suspicious rather than converting it to a single return. -- Derek M. Jones tel: +44 (0) 1252 520 667 Knowledge Software Ltd mailto:[email protected] Source code analysis http://www.knosof.co.uk _______________________________________________ Cocci mailing list [email protected] http://lists.diku.dk/mailman/listinfo/cocci (Web access from inside DIKUs LAN only)
