diff options
author | Daniel Mack <daniel@zonque.org> | 2016-01-12 15:34:20 +0100 |
---|---|---|
committer | Daniel Mack <daniel@zonque.org> | 2016-01-12 15:36:32 +0100 |
commit | d054f0a4d451120c26494263fc4dc175bfd405b1 (patch) | |
tree | 43606871b8012973ac6f3936d4887a5c658ce097 /src/login | |
parent | 1f52a79d4eb0216bf1f2d96539609f02d8bb9e71 (diff) |
tree-wide: use xsprintf() where applicable
Also add a coccinelle receipt to help with such transitions.
Diffstat (limited to 'src/login')
-rw-r--r-- | src/login/logind-seat.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/login/logind-seat.c b/src/login/logind-seat.c index 1f4936cebe..9d111f737c 100644 --- a/src/login/logind-seat.c +++ b/src/login/logind-seat.c @@ -34,6 +34,7 @@ #include "logind-seat.h" #include "mkdir.h" #include "parse-util.h" +#include "stdio-util.h" #include "string-util.h" #include "terminal-util.h" #include "util.h" @@ -181,7 +182,7 @@ static int vt_allocate(unsigned int vtnr) { assert(vtnr >= 1); - snprintf(p, sizeof(p), "/dev/tty%u", vtnr); + xsprintf(p, "/dev/tty%u", vtnr); fd = open_terminal(p, O_RDWR|O_NOCTTY|O_CLOEXEC); if (fd < 0) return -errno; |