diff options
author | Lennart Poettering <lennart@poettering.net> | 2019-04-08 14:31:15 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2019-04-08 14:31:15 +0200 |
commit | ca7410fe430eb6231aa5f402007a1692ebdb6e39 (patch) | |
tree | 14bfc5ba1af61253885ba95a76b41b050d80f012 /coccinelle/empty-or-dash.cocci | |
parent | basic: add new helper call empty_or_dash_to_null() (diff) | |
download | systemd-ca7410fe430eb6231aa5f402007a1692ebdb6e39.tar.xz systemd-ca7410fe430eb6231aa5f402007a1692ebdb6e39.zip |
coccinelle: add coccinelle script for empty_or_dash() use
Diffstat (limited to 'coccinelle/empty-or-dash.cocci')
-rw-r--r-- | coccinelle/empty-or-dash.cocci | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/coccinelle/empty-or-dash.cocci b/coccinelle/empty-or-dash.cocci new file mode 100644 index 0000000000..bebaead2ff --- /dev/null +++ b/coccinelle/empty-or-dash.cocci @@ -0,0 +1,5 @@ +@@ +expression s; +@@ +- (isempty(s) || streq(s, "-")) ++ empty_or_dash(s) |