From a8ea93a5e2a5d6cc2d448a42c265bac2408e0b21 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 7 Dec 2017 12:13:00 +0100 Subject: core: use empty_to_null() where we can --- coccinelle/empty-to-null.cocci | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 coccinelle/empty-to-null.cocci (limited to 'coccinelle') diff --git a/coccinelle/empty-to-null.cocci b/coccinelle/empty-to-null.cocci new file mode 100644 index 0000000000..fbc75b9c34 --- /dev/null +++ b/coccinelle/empty-to-null.cocci @@ -0,0 +1,5 @@ +@@ +expression s; +@@ +- isempty(s) ? NULL : s ++ empty_to_null(s) -- cgit v1.2.1