chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
core/main: use _cleanup_
[elogind.git]
/
src
/
shared
/
log.c
diff --git
a/src/shared/log.c
b/src/shared/log.c
index 876f22dfc5535af48c10255c553324dc04302f5a..27317f7ed3ce13c4811d8ad53fa311f6e7b9e785 100644
(file)
--- 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;
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 */
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 *);
}
format = va_arg(ap, char *);
}
- zero(mh);
- mh.msg_iov = iovec;
mh.msg_iovlen = n;
if (sendmsg(journal_fd, &mh, MSG_NOSIGNAL) < 0)
mh.msg_iovlen = n;
if (sendmsg(journal_fd, &mh, MSG_NOSIGNAL) < 0)