X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fshared%2Flog.c;h=27317f7ed3ce13c4811d8ad53fa311f6e7b9e785;hp=876f22dfc5535af48c10255c553324dc04302f5a;hb=543295ad369793bdac510c6c3bf4afae8f1cdab5;hpb=e8e581bf256b8c0fbd430935af79fa0e8ee570a1 diff --git a/src/shared/log.c b/src/shared/log.c index 876f22dfc..27317f7ed 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)