summaryrefslogtreecommitdiffstats
path: root/coccinelle/empty-to-null.cocci
blob: bc6c656e798a22cfde36457facb9c85042740f64 (plain)
1
2
3
4
5
6
7
8
@@
/* Avoid running this transformation on the empty_to_null function itself */
position p : script:python() { p[0].current_element != "empty_to_null" };
expression s;
@@

- isempty@p(s) ? NULL : s
+ empty_to_null(s)