summaryrefslogtreecommitdiff
path: root/src/core/job.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-01-27 08:00:11 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-02-01 17:21:39 -0500
commit5ffa8c818120e35c89becd938d160235c069dd12 (patch)
treee4a1ce20a003e23618bd54f49cb4acf68aed70cd /src/core/job.c
parent294929f8916ca37d89ccb1757868d22f8068c56b (diff)
Add a snprinf wrapper which checks that the buffer was big enough
If we scale our buffer to be wide enough for the format string, we should expect that the calculation was correct. char_array_0() invocations are removed, since snprintf nul-terminates the output in any case. A similar wrapper is used for strftime calls, but only in timedatectl.c.
Diffstat (limited to 'src/core/job.c')
-rw-r--r--src/core/job.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/core/job.c b/src/core/job.c
index 2129773ede..4740ff18cb 100644
--- a/src/core/job.c
+++ b/src/core/job.c
@@ -764,7 +764,6 @@ static void job_log_status_message(Unit *u, JobType t, JobResult result) {
DISABLE_WARNING_FORMAT_NONLITERAL;
snprintf(buf, sizeof(buf), format, unit_description(u));
- char_array_0(buf);
REENABLE_WARNING;
if (t == JOB_START) {