diff options
| author | Julia Lawall <[email protected]> | 2009-10-17 08:34:39 +0200 |
|---|---|---|
| committer | Len Brown <[email protected]> | 2009-11-05 17:30:57 -0500 |
| commit | 5cfa245b0b63c3d79568e78a1ee3d00654d5517d (patch) | |
| tree | 161590c73691e744b176decedd41504d4de6f4c4 /tools/perf/util/scripting-engines/trace-event-python.c | |
| parent | 941b10fab2cbd90ac7ad6bc2338ffe30e1d3ce53 (diff) | |
ACPI: Move dereference after NULL test
If the NULL test on pr is needed, then the dereference should be after the
NULL test.
A simplified version of the semantic match that detects this problem is as
follows (http://coccinelle.lip6.fr/):
// <smpl>
@match exists@
expression x, E;
identifier fld;
@@
* x->fld
... when != \(x = E\|&x\)
* x == NULL
// </smpl>
Signed-off-by: Julia Lawall <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Len Brown <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions