| 1 | // can constraint to specific function by using multiple rules |
| 2 | |
| 3 | @ rule1 @ |
| 4 | struct file_operations x; |
| 5 | identifier ioctl_fn; |
| 6 | @@ |
| 7 | |
| 8 | x.ioctl = ioctl_fn; |
| 9 | |
| 10 | |
| 11 | @@ |
| 12 | identifier rule1.ioctl_fn; |
| 13 | @@ |
| 14 | |
| 15 | ioctl_fn(...) |
| 16 | { |
| 17 | |
| 18 | - foo(1); |
| 19 | + foo(2); |
| 20 | } |
| 21 | |