diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-01-12 16:03:48 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-01-12 16:03:48 +0100 |
commit | 45630488f9dc510c0b9da1932c5046160e6871ec (patch) | |
tree | 43606871b8012973ac6f3936d4887a5c658ce097 /src/shared | |
parent | 1f52a79d4eb0216bf1f2d96539609f02d8bb9e71 (diff) | |
parent | d054f0a4d451120c26494263fc4dc175bfd405b1 (diff) |
Merge pull request #2308 from zonque/xsprintf
tree-wide: use xsprintf() where applicable
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/switch-root.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/shared/switch-root.c b/src/shared/switch-root.c index b1bbbdaadd..bf0739e5fa 100644 --- a/src/shared/switch-root.c +++ b/src/shared/switch-root.c @@ -35,6 +35,7 @@ #include "mkdir.h" #include "path-util.h" #include "rm-rf.h" +#include "stdio-util.h" #include "string-util.h" #include "switch-root.h" #include "user-util.h" @@ -77,7 +78,7 @@ int switch_root(const char *new_root, const char *oldroot, bool detach_oldroot, char new_mount[PATH_MAX]; struct stat sb; - snprintf(new_mount, sizeof(new_mount), "%s%s", new_root, i); + xsprintf(new_mount, "%s%s", new_root, i); mkdir_p_label(new_mount, 0755); |