Re: pstore: Improve a size determination in three functions
From: SF Markus Elfring
Date: Wed Aug 16 2017 - 16:03:58 EST
> Which script detected this?
* checkpatch.pl
* The following approach for the semantic patch language.
@replacement@
identifier action, var, work;
statement s1, s2;
statement list sl;
type T, X;
@@
T work(...)
{
... when any
X* var;
... when any
var = action(...,
sizeof(
- X
+ *var
),
...
)
... when any
}