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/vconsole | |
parent | 1f52a79d4eb0216bf1f2d96539609f02d8bb9e71 (diff) | |
download | systemd-d054f0a4d451120c26494263fc4dc175bfd405b1.tar.gz |
tree-wide: use xsprintf() where applicable
Also add a coccinelle receipt to help with such transitions.
Diffstat (limited to 'src/vconsole')
-rw-r--r-- | src/vconsole/vconsole-setup.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c index a5f4529cfd..622fbe9a6d 100644 --- a/src/vconsole/vconsole-setup.c +++ b/src/vconsole/vconsole-setup.c @@ -39,6 +39,7 @@ #include "log.h" #include "process-util.h" #include "signal-util.h" +#include "stdio-util.h" #include "string-util.h" #include "terminal-util.h" #include "util.h" @@ -215,11 +216,11 @@ static void font_copy_to_all_vcs(int fd) { continue; /* skip non-allocated ttys */ - snprintf(vcname, sizeof(vcname), "/dev/vcs%i", i); + xsprintf(vcname, "/dev/vcs%i", i); if (access(vcname, F_OK) < 0) continue; - snprintf(vcname, sizeof(vcname), "/dev/tty%i", i); + xsprintf(vcname, "/dev/tty%i", i); vcfd = open_terminal(vcname, O_RDWR|O_CLOEXEC); if (vcfd < 0) continue; |