aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mack <daniel@zonque.org>2016-01-12 15:34:20 +0100
committerDaniel Mack <daniel@zonque.org>2016-01-12 15:36:32 +0100
commitd054f0a4d451120c26494263fc4dc175bfd405b1 (patch)
tree43606871b8012973ac6f3936d4887a5c658ce097 /coccinelle
parentMerge pull request #2265 from ipuustin/ambient (diff)
downloadsystemd-d054f0a4d451120c26494263fc4dc175bfd405b1.tar.gz
systemd-d054f0a4d451120c26494263fc4dc175bfd405b1.tar.bz2
systemd-d054f0a4d451120c26494263fc4dc175bfd405b1.zip
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);