Hello,

I have tried another tiny script variant out for the semantic patch language
(according to the software combination “Coccinelle 1.0.8-00131-g675b9670”).

@display@
expression* x;
statement is, es;
@@
*if (!x)
    is
 else
    es


elfring@Sonne:~/Projekte/Coccinelle/janitor> spatch --parse-cocci 
show_null_pointer_checks.cocci
…
if (*!*x *!= *NULL)
…
if (*!*NULL *!= *x)
…
if (*x *!= *NULL *== *NULL)
…
if (*NULL *!= *x *== *NULL)
…
if (*NULL *== *x *!= *NULL)
…
if (*NULL *== *NULL *!= *x)
…


Now I find the shown lines in such a program output questionable.
Should these presentations of elements in SmPL disjunctions be shorter?

Regards,
Markus
_______________________________________________
Cocci mailing list
Cocci@systeme.lip6.fr
https://systeme.lip6.fr/mailman/listinfo/cocci

Reply via email to