lkml.org 
[lkml]   [2011]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [tip:perf/core] perf probe: Clean up probe_point_lazy_walker() return value
Em Wed, Mar 16, 2011 at 08:59:17AM +0100, Peter Zijlstra escreveu:
> On Tue, 2011-03-15 at 23:18 +0000, tip-bot for Ingo Molnar wrote:
>
> > perf probe: Clean up probe_point_lazy_walker() return value
>
> > --- 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,
> > * Continue if no error, because the lazy pattern will match
> > * to other lines
> > */
> > - return ret < 0 ?: 0;
> > + return ret < 0 ? ret : 0;
> > }
>
> It is a slight change in semantics though, the return value will now be
> negative instead of 1. If its used as a boolean that's fine, but still.
>
> I'd have changed it to:
>
> return ret < 0;
>
> Which is identical to the previous statement.

Looks similar to the problem fixed in:

fbee632d0ca9f4073a3fefb9a843eac8af036b0f

for another function, I bet the intent in both cases was to return ret,
i.e. the negative value.

- Arnaldo


\
 
 \ /
  Last update: 2011-03-16 15:19    [W:0.054 / U:0.528 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site