lkml.org 
[lkml]   [2009]   [Jul]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] tracing/function: simplify for __ftrace_replace_code()
>> +	if (enable && !(rec->flags & FTRACE_FL_NOTRACE)) {
>> + if (ftrace_filtered) {
>> + if (rec->flags & FTRACE_FL_FILTER)
>> + flag = FTRACE_FL_ENABLED;
>> + } else
>> + flag = FTRACE_FL_ENABLED;
>
>
> The above can be factorized in
>
> if (!ftrace_filtered || rec->flags & FTRACE_FL_FILTER)
> flag = FTRACE_FL_ENABLED
>

I think it's better to put the latter condition into parentheses:

if (!ftrace_filtered || (rec->flags & FTRACE_FL_FILTER))
flag = FTRACE_FL_ENABLED



\
 
 \ /
  Last update: 2009-07-17 06:33    [W:0.083 / U:29.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site