summaryrefslogtreecommitdiff
path: root/src/udev/collect/collect.c
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 /src/udev/collect/collect.c
parent1f52a79d4eb0216bf1f2d96539609f02d8bb9e71 (diff)
tree-wide: use xsprintf() where applicable
Also add a coccinelle receipt to help with such transitions.
Diffstat (limited to 'src/udev/collect/collect.c')
-rw-r--r--src/udev/collect/collect.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/udev/collect/collect.c b/src/udev/collect/collect.c
index b6c95cd452..349585b634 100644
--- a/src/udev/collect/collect.c
+++ b/src/udev/collect/collect.c
@@ -27,6 +27,7 @@
#include "alloc-util.h"
#include "libudev-private.h"
#include "macro.h"
+#include "stdio-util.h"
#include "string-util.h"
#define BUFSIZE 16
@@ -91,7 +92,7 @@ static int prepare(char *dir, char *filename)
if (r < 0 && errno != EEXIST)
return -errno;
- snprintf(buf, sizeof(buf), "%s/%s", dir, filename);
+ xsprintf(buf, "%s/%s", dir, filename);
fd = open(buf,O_RDWR|O_CREAT|O_CLOEXEC, S_IRUSR|S_IWUSR);
if (fd < 0)