summaryrefslogtreecommitdiff
path: root/coccinelle
diff options
context:
space:
mode:
authorDaniel Mack <daniel@zonque.org>2016-01-12 15:34:20 +0100
committerSven Eden <yamakuzure@gmx.net>2017-05-17 15:22:15 +0200
commit54a8753f304bec05fe1a2007227ec8af11acf68b (patch)
tree2e47cac69ef3d0853926db9b85c48772ccfc77e0 /coccinelle
parent84c270d45ec47f2e42c4e2780ad94f51e70b0ae8 (diff)
tree-wide: use xsprintf() where applicable
Also add a coccinelle receipt to help with such transitions.
Diffstat (limited to 'coccinelle')
-rw-r--r--coccinelle/xsprintf.cocci6
1 files changed, 6 insertions, 0 deletions
diff --git a/coccinelle/xsprintf.cocci b/coccinelle/xsprintf.cocci
new file mode 100644
index 000000000..401216ad7
--- /dev/null
+++ b/coccinelle/xsprintf.cocci
@@ -0,0 +1,6 @@
+@@
+expression e, fmt;
+expression list vaargs;
+@@
+- snprintf(e, sizeof(e), fmt, vaargs);
++ xsprintf(e, fmt, vaargs);