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/empty-to-null.cocci | |
parent | coccinelle: improve run-coccinelle.sh to take list of scripts to run (diff) | |
download | systemd-a8ea93a5e2a5d6cc2d448a42c265bac2408e0b21.tar.xz systemd-a8ea93a5e2a5d6cc2d448a42c265bac2408e0b21.zip |
core: use empty_to_null() where we can
Diffstat (limited to 'coccinelle/empty-to-null.cocci')
-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) |