coccinelle
Tobin C. Harding
me at tobin.cc
Tue Mar 14 03:21:06 EDT 2017
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.
More information about the Kernelnewbies
mailing list