]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Add Coccinelle patch for strempty() usage
authorDaniel Mack <daniel@zonque.org>
Wed, 30 Sep 2015 10:23:57 +0000 (12:23 +0200)
committerDaniel Mack <daniel@zonque.org>
Wed, 30 Sep 2015 10:24:16 +0000 (12:24 +0200)
coccinelle/strempty.cocci [new file with mode: 0644]

diff --git a/coccinelle/strempty.cocci b/coccinelle/strempty.cocci
new file mode 100644 (file)
index 0000000..e3bd0a1
--- /dev/null
@@ -0,0 +1,10 @@
+@@
+expression s;
+@@
+- s ?: ""
++ strempty(s)
+@@
+expression s;
+@@
+- s ? s : ""
++ strempty(s)