summaryrefslogtreecommitdiff
path: root/src/journal/journald-stream.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2019-11-27 13:04:07 +0100
committerLennart Poettering <lennart@poettering.net>2020-01-31 15:03:07 +0100
commitd98580e4380edd569c41ea950da19c88905cf11e (patch)
tree9af2399a44bc55c4df573a9fe6645d58a5ef9d4e /src/journal/journald-stream.c
parent24352691713179e27491b9294625b96b95fd9ed1 (diff)
downloadsystemd-d98580e4380edd569c41ea950da19c88905cf11e.tar.gz
journald: use structured initialization
Diffstat (limited to 'src/journal/journald-stream.c')
-rw-r--r--src/journal/journald-stream.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/journal/journald-stream.c b/src/journal/journald-stream.c
index 671e627357..7905887152 100644
--- a/src/journal/journald-stream.c
+++ b/src/journal/journald-stream.c
@@ -590,12 +590,14 @@ int stdout_stream_install(Server *s, int fd, StdoutStream **ret) {
if (r < 0)
return log_error_errno(r, "Failed to generate stream ID: %m");
- stream = new0(StdoutStream, 1);
+ stream = new(StdoutStream, 1);
if (!stream)
return log_oom();
- stream->fd = -1;
- stream->priority = LOG_INFO;
+ *stream = (StdoutStream) {
+ .fd = -1,
+ .priority = LOG_INFO,
+ };
xsprintf(stream->id_field, "_STREAM_ID=" SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL(id));