coccinelle

Peter Senna Tschudin peter.senna at gmail.com
Tue Mar 14 03:52:02 EDT 2017


I guess this is off topic on this list. There is an specific
Coccinelle mailing list:

https://systeme.lip6.fr/mailman/listinfo/cocci




On Tue, Mar 14, 2017 at 8:21 AM, Tobin C. Harding <me at tobin.cc> wrote:
> Attempting to do transform using Coccinelle
>
> if (foo != 0) {
>    ...
>
> ->
>
> if (foo) {
>    ...
>
> Coccinelle script attempt does not work
>
> @@ expression x; @@
> (
> - x != 0
> + x
> )
>
> `spatch --parse-cocci script.cocci` appears to pass. A similar script
> worked correctly
>
> @@ expression x; @@
> (
> - x == 0
> + !x
> )
>
> I have read various papers and tutorials to no avail. I have tried
> various other versions also with no success.
>
> Any pointers most appreciated.
>
> thanks,
> Tobin.
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



-- 
Peter



More information about the Kernelnewbies mailing list