diff options
author | Lennart Poettering <lennart@poettering.net> | 2017-12-07 12:13:00 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2017-12-07 12:13:00 +0100 |
commit | a8ea93a5e2a5d6cc2d448a42c265bac2408e0b21 (patch) | |
tree | 293aa89e43cb8816321d494c6768c865d0079c8d /coccinelle | |
parent | 3708254f3666744b095b17f8ee98ab651b12b4f3 (diff) | |
download | systemd-a8ea93a5e2a5d6cc2d448a42c265bac2408e0b21.tar.gz |
core: use empty_to_null() where we can
Diffstat (limited to 'coccinelle')
-rw-r--r-- | coccinelle/empty-to-null.cocci | 5 |
1 files changed, 5 insertions, 0 deletions
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) |