summaryrefslogtreecommitdiff
path: root/coccinelle/empty-to-null.cocci
blob: 1cc89475a6f055f4661f1858dce5749cb197c489 (plain)
1
2
3
4
5
6
7
8
9
/* SPDX-License-Identifier: LGPL-2.1-or-later */
@@
/* 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)