Hello,
A patch on a topic like “staging/rtl8723bs/core/rtw_ap: Remove redundant call
to memset” caught also my software development attention.
https://lkml.org/lkml/2019/6/15/220
https://lore.kernel.org/patchwork/patch/1089416/
https://lore.kernel.org/lkml/20190616033527.GA14062@hari-Inspiron-1545/
The following script for the semantic patch language points the shown
change possibility out as expected.
@display@
expression ex;
identifier zm =~ "_zmalloc";
statement is;
@@
ex = zm(...);
if (ex == NULL)
is
*memset(ex, 0, ...);
I would expect that the following SmPL script can work in a similar way.
@display@
expression ex;
identifier zm =~ "_zmalloc";
statement is, es;
@@
ex = zm(...);
if (ex)
is
else
es
*memset(ex, 0, ...);
But this approach does not point an update candidate out at the moment.
How do you think about the software situation?
Regards,
Markus
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci