[Cocci] getting rid of implicit boolean expressions

2021-04-21 Thread Akos Pasztory
Hi, I'm trying do the following kind of transformations: int x, y; char *p; bool b, c; -b = x || !y; +b = (x != 0) || (y == 0); -c = !p; +c = (p == NULL); -if (x & 3) +if ((x & 3) != 0) f(); // etc That is: trying to eliminate implicit boolean-ness (and add parentheses as well). I was

[Cocci] unreadable files

2014-08-05 Thread Akos PASZTORY
Currently if coccinelle meets a file that it cannot open (e.g. it's an dangling symlink), it exits with: Fatal error: exception Sys_error(/tmp/aa/what.c: No such file or directory) even if run in recursive mode (i.e. passing a directory as argument). Could you please add a command line option to