lkml.org 
[lkml]   [2016]   [Jul]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: staging: ks7010: Delete unnecessary uses of the variable "retval"
From
Date
>> Can you follow expectations around the proposed refactoring of any
>> function implementations?
>
> I don't understand both questions. Maybe you need to give examples?

I suggest to try the following script (semantic patch for working with
the Coccinelle software) out on the discussed source files.


@checking_function_calls_directly@
identifier checker, retval, work;
expression list el;
statement is, es;
type rt;
@@
rt checker(...)
{
<+...
-retval = work(el);
if (
- retval
+ work(el)
)
is
else
es
...+>
}


Do you find such a source code transformation useful?

Regards,
Markus

\
 
 \ /
  Last update: 2016-07-22 00:01    [W:1.024 / U:0.084 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site