1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-05 15:21:37 +03:00
systemd/coccinelle/empty-to-null.cocci

9 lines
217 B
Plaintext
Raw Normal View History

2017-12-07 14:13:00 +03:00
@@
/* Avoid running this transformation on the empty_to_null function itself */
position p : script:python() { p[0].current_element != "empty_to_null" };
2017-12-07 14:13:00 +03:00
expression s;
@@
- isempty@p(s) ? NULL : s
2017-12-07 14:13:00 +03:00
+ empty_to_null(s)