diff options
author | Ingo Molnar <mingo@elte.hu> | 2011-03-15 15:51:09 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-03-15 15:51:09 -0400 |
commit | 5e814dd597c42daeb8d2a276e64a6ec986ad0e2a (patch) | |
tree | e06a7c18e840745869ffa72d568d4c125c7e3fb4 /tools/perf/util/probe-finder.c | |
parent | 137ee20ddd10fdc20600c389fe63edab0c39cb1a (diff) |
perf probe: Clean up probe_point_lazy_walker() return value
Newer compilers (gcc 4.6) complains about:
return ret < 0 ?: 0;
For the following reason:
util/probe-finder.c: In function ‘probe_point_lazy_walker’:
util/probe-finder.c:1331:18: error: the omitted middle operand in ?: will always be ‘true’, suggest explicit middle operand [-Werror=parentheses]
And indeed the return value is a somewhat obscure (but correct) value
of 'true', so return 'ret' instead - this is cleaner and unconfuses
GCC as well.
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util/probe-finder.c')
-rw-r--r-- | tools/perf/util/probe-finder.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c index 17f9c4a66ddd..194f9e2a3285 100644 --- a/tools/perf/util/probe-finder.c +++ b/tools/perf/util/probe-finder.c | |||
@@ -1328,7 +1328,7 @@ static int probe_point_lazy_walker(const char *fname, int lineno, | |||
1328 | * Continue if no error, because the lazy pattern will match | 1328 | * Continue if no error, because the lazy pattern will match |
1329 | * to other lines | 1329 | * to other lines |
1330 | */ | 1330 | */ |
1331 | return ret < 0 ?: 0; | 1331 | return ret < 0 ? ret : 0; |
1332 | } | 1332 | } |
1333 | 1333 | ||
1334 | /* Find probe points from lazy pattern */ | 1334 | /* Find probe points from lazy pattern */ |