summaryrefslogtreecommitdiff
path: root/src/core/unit.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/core/unit.c
parent1f52a79d4eb0216bf1f2d96539609f02d8bb9e71 (diff)
tree-wide: use xsprintf() where applicable
Also add a coccinelle receipt to help with such transitions.
Diffstat (limited to 'src/core/unit.c')
-rw-r--r--src/core/unit.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/unit.c b/src/core/unit.c
index e1bc6c75cb..32267d95f5 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -51,6 +51,7 @@
#include "set.h"
#include "special.h"
#include "stat-util.h"
+#include "stdio-util.h"
#include "string-util.h"
#include "strv.h"
#include "unit-name.h"
@@ -1412,7 +1413,7 @@ static void unit_status_log_starting_stopping_reloading(Unit *u, JobType t) {
format = unit_get_status_message_format(u, t);
DISABLE_WARNING_FORMAT_NONLITERAL;
- snprintf(buf, sizeof(buf), format, unit_description(u));
+ xsprintf(buf, format, unit_description(u));
REENABLE_WARNING;
mid = t == JOB_START ? SD_MESSAGE_UNIT_STARTING :