summaryrefslogtreecommitdiff
path: root/src/journal/journald-console.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/journal/journald-console.c')
-rw-r--r--src/journal/journald-console.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/journal/journald-console.c b/src/journal/journald-console.c
index 039f1a68ce..98fbb83a0c 100644
--- a/src/journal/journald-console.c
+++ b/src/journal/journald-console.c
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: LGPL-2.1+ */
/***
This file is part of systemd.
@@ -57,8 +58,8 @@ void server_forward_console(
struct iovec iovec[5];
struct timespec ts;
- char tbuf[sizeof("[] ")-1 + DECIMAL_STR_MAX(ts.tv_sec) + DECIMAL_STR_MAX(ts.tv_nsec)-3 + 1];
- char header_pid[sizeof("[]: ")-1 + DECIMAL_STR_MAX(pid_t)];
+ char tbuf[STRLEN("[] ") + DECIMAL_STR_MAX(ts.tv_sec) + DECIMAL_STR_MAX(ts.tv_nsec)-3 + 1];
+ char header_pid[STRLEN("[]: ") + DECIMAL_STR_MAX(pid_t)];
_cleanup_free_ char *ident_buf = NULL;
_cleanup_close_ int fd = -1;
const char *tty;