Re: coccinelle

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxx> 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@xxxxxxxxxxxxxxxxx
> https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



-- 
Peter

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux