linux/tools/perf
Julia Lawall f39cdf25bf perf tools: Move dereference after NULL test
In each case, if the NULL test on thread 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 <julia@diku.dk>
LKML-Reference: <Pine.LNX.4.64.0910170842500.9213@ask.diku.dk>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-10-17 09:29:10 +02:00
..
Documentation perf timechart: Add a power-only mode 2009-10-01 09:26:40 +02:00
util perf trace: Add filter Suppport 2009-10-15 11:35:23 +02:00
.gitignore perf tools: .gitignore += perf*.html 2009-09-24 14:01:22 +02:00
builtin-annotate.c perf tools: Move dereference after NULL test 2009-10-17 09:29:10 +02:00
builtin-help.c perf: Enable more compiler warnings 2009-08-16 10:47:47 +02:00
builtin-list.c perf list: Fix large list output by using the pager 2009-08-13 09:05:48 +02:00
builtin-record.c perf trace: Add filter Suppport 2009-10-15 11:35:23 +02:00
builtin-report.c perf tools: Move dereference after NULL test 2009-10-17 09:29:10 +02:00
builtin-sched.c perf tools: Move dereference after NULL test 2009-10-17 09:29:10 +02:00
builtin-stat.c perf: Propagate term signal to child 2009-10-04 19:37:39 +02:00
builtin-timechart.c perf timechart: Add a power-only mode 2009-10-01 09:26:40 +02:00
builtin-top.c perf tools: Remove expensive old debug code from perf top 2009-10-13 15:30:15 +02:00
builtin-trace.c perf tools: Move dereference after NULL test 2009-10-17 09:29:10 +02:00
builtin.h perf: Add the timechart tool 2009-09-19 11:42:13 +02:00
command-list.txt perf: Add timechart help text and add timechart to "perf help" 2009-09-19 18:57:53 +02:00
CREDITS perf_counter tools: Add CREDITS file for Git contributors 2009-06-24 19:54:29 +02:00
design.txt perf_event: Provide vmalloc() based mmap() backing 2009-10-06 14:21:50 +02:00
Makefile Merge branch 'linus' into perf/core 2009-10-15 08:44:44 +02:00
perf.c perf tools: Do not manually count string lengths 2009-10-13 11:55:31 +02:00
perf.h perf: Do the big rename: Performance Counters -> Performance Events 2009-09-21 14:28:04 +02:00