From 543295ad369793bdac510c6c3bf4afae8f1cdab5 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Mon, 15 Apr 2013 21:58:22 -0400 Subject: core/main: use _cleanup_ --- src/shared/log.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/shared/log.c') 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) -- cgit v1.2.3-54-g00ecf