| /// PTR_ERR should be applied before its argument is reassigned, typically |
| // Copyright: (C) 2012 Julia Lawall, INRIA/LIP6. GPLv2. |
| // Copyright: (C) 2012 Gilles Muller, INRIA/LiP6. GPLv2. |
| // URL: http://coccinelle.lip6.fr/ |
| // Options: --no-includes --include-headers |
| @script:python depends on org@ |
| cocci.print_main("PTR_ERR",p2) |
| cocci.print_secs("assignment",p1) |
| @script:python depends on report@ |
| msg = "ERROR: PTR_ERR applied after initialization to constant on line %s" % (p1[0].line) |
| coccilib.report.print_report(p2[0],msg) |