Commit 5e814dd5 authored by Ingo Molnar's avatar Ingo Molnar

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: default avatarIngo Molnar <mingo@elte.hu>
parent 137ee20d
...@@ -1328,7 +1328,7 @@ static int probe_point_lazy_walker(const char *fname, int lineno, ...@@ -1328,7 +1328,7 @@ static int probe_point_lazy_walker(const char *fname, int lineno,
* Continue if no error, because the lazy pattern will match * Continue if no error, because the lazy pattern will match
* to other lines * to other lines
*/ */
return ret < 0 ?: 0; return ret < 0 ? ret : 0;
} }
/* Find probe points from lazy pattern */ /* Find probe points from lazy pattern */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment