diff options
author | Lennart Poettering <lennart@poettering.net> | 2019-11-27 13:04:07 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2020-01-31 15:03:07 +0100 |
commit | d98580e4380edd569c41ea950da19c88905cf11e (patch) | |
tree | 9af2399a44bc55c4df573a9fe6645d58a5ef9d4e /src | |
parent | journald: add logging for one error we lacked logging for (diff) | |
download | systemd-d98580e4380edd569c41ea950da19c88905cf11e.tar.xz systemd-d98580e4380edd569c41ea950da19c88905cf11e.zip |
journald: use structured initialization
Diffstat (limited to 'src')
-rw-r--r-- | src/journal/journald-stream.c | 8 |
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)); |