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
@@ -25,6 +25,7 @@
#include "libudev.h"
#include "stdio-util.h"
#include "string-util.h"
#include "udev-util.h"
#include "util.h"
@@ -460,7 +461,7 @@ int main(int argc, char *argv[]) {
/* add sys path if needed */
if (!startswith(syspath, "/sys")) {
snprintf(path, sizeof(path), "/sys/%s", syspath);
xsprintf(path, "/sys/%s", syspath);
syspath = path;
}