summaryrefslogtreecommitdiff
path: root/coccinelle
diff options
context:
space:
mode:
authorDaniel Mack <daniel@zonque.org>2015-09-30 12:23:57 +0200
committerDaniel Mack <daniel@zonque.org>2015-09-30 12:24:16 +0200
commitde896126ea54f6134a648f21a5ba6b5b610512e0 (patch)
tree2128467bc6fa7e010577a93e8e7176eff95fb409 /coccinelle
parent68382f22d75a36e7f2d89ce9438654e9d6461709 (diff)
downloadsystemd-de896126ea54f6134a648f21a5ba6b5b610512e0.tar.gz
Add Coccinelle patch for strempty() usage
Diffstat (limited to 'coccinelle')
-rw-r--r--coccinelle/strempty.cocci10
1 files changed, 10 insertions, 0 deletions
diff --git a/coccinelle/strempty.cocci b/coccinelle/strempty.cocci
new file mode 100644
index 0000000000..e3bd0a1f56
--- /dev/null
+++ b/coccinelle/strempty.cocci
@@ -0,0 +1,10 @@
+@@
+expression s;
+@@
+- s ?: ""
++ strempty(s)
+@@
+expression s;
+@@
+- s ? s : ""
++ strempty(s)