diff options
author | Stefan Metzmacher <metze@samba.org> | 2014-08-07 09:51:57 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2014-09-24 08:44:11 +0200 |
commit | fbcd912bb6114d203a8645e9aec1c6134e9ebf3f (patch) | |
tree | 946516e95bf9c793b3ab19fcd6c46262cfd6a481 /source3/lib/messages.c | |
parent | 93423cb1f594244e916e4ac3cb1d32220c48c172 (diff) | |
download | samba-fbcd912bb6114d203a8645e9aec1c6134e9ebf3f.tar.gz samba-fbcd912bb6114d203a8645e9aec1c6134e9ebf3f.tar.xz samba-fbcd912bb6114d203a8645e9aec1c6134e9ebf3f.zip |
s3:messaging: use struct initializers for 'struct messaging_rec'
This makes sure new struct members will always be initialized,
without explicitly finding all users.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source3/lib/messages.c')
-rw-r--r-- | source3/lib/messages.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/source3/lib/messages.c b/source3/lib/messages.c index 52d6538542..0e0259236e 100644 --- a/source3/lib/messages.c +++ b/source3/lib/messages.c @@ -466,11 +466,14 @@ NTSTATUS messaging_send_iov(struct messaging_context *msg_ctx, return NT_STATUS_NO_MEMORY; } - rec.msg_version = MESSAGE_VERSION; - rec.msg_type = msg_type & MSG_TYPE_MASK; - rec.dest = server; - rec.src = msg_ctx->id; - rec.buf = data_blob_const(buf, talloc_get_size(buf)); + rec = (struct messaging_rec) { + .msg_version = MESSAGE_VERSION, + .msg_type = msg_type & MSG_TYPE_MASK, + .dest = server, + .src = msg_ctx->id, + .buf = data_blob_const(buf, talloc_get_size(buf)), + }; + messaging_dispatch_rec(msg_ctx, &rec); TALLOC_FREE(buf); return NT_STATUS_OK; |