tree-wide: use xsprintf() where applicable

Also add a coccinelle receipt to help with such transitions.
This commit is contained in:
Daniel Mack
2016-01-12 15:36:32 +01:00
parent 1f52a79d4e
commit d054f0a4d4
21 changed files with 70 additions and 40 deletions
+2 -1
View File
@@ -53,6 +53,7 @@
#include "set.h"
#include "special.h"
#include "stat-util.h"
#include "stdio-util.h"
#include "string-table.h"
#include "string-util.h"
#include "unit-name.h"
@@ -716,7 +717,7 @@ int cg_attach(const char *controller, const char *path, pid_t pid) {
if (pid == 0)
pid = getpid();
snprintf(c, sizeof(c), PID_FMT"\n", pid);
xsprintf(c, PID_FMT "\n", pid);
return write_string_file(fs, c, 0);
}