Re: pstore: Improve a size determination in three functions

SF Markus Elfring
2017-08-16T20:03:32Z

> 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
}