diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-04-15 21:58:22 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-04-17 00:09:16 -0400 |
commit | 543295ad369793bdac510c6c3bf4afae8f1cdab5 (patch) | |
tree | aa04d95ee9e9ef86dc27788d8f5fcbb42082228b /src/shared/log.c | |
parent | e8e581bf256b8c0fbd430935af79fa0e8ee570a1 (diff) |
core/main: use _cleanup_
Diffstat (limited to 'src/shared/log.c')
-rw-r--r-- | src/shared/log.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/shared/log.c b/src/shared/log.c index 876f22dfc5..27317f7ed3 100644 --- a/src/shared/log.c +++ b/src/shared/log.c @@ -737,7 +737,9 @@ int log_struct_internal( char header[LINE_MAX]; struct iovec iovec[17] = {}; unsigned n = 0, i; - struct msghdr mh; + struct msghdr mh = { + .msg_iov = iovec, + }; static const char nl = '\n'; /* If the journal is available do structured logging */ @@ -775,8 +777,6 @@ int log_struct_internal( format = va_arg(ap, char *); } - zero(mh); - mh.msg_iov = iovec; mh.msg_iovlen = n; if (sendmsg(journal_fd, &mh, MSG_NOSIGNAL) < 0) |