[Spice-devel] [server PATCH 3/4] test-stream: initialize msg.msg_flags
Uri Lublin
uril at redhat.com
Sun Dec 10 11:05:18 UTC 2017
Coverity complains the field is not initialized.
That's true but man recvmsg specifies that this
field is set by recvmsg.
To make coverity happy, initialize this field.
Signed-off-by: Uri Lublin <uril at redhat.com>
---
server/tests/test-stream.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/server/tests/test-stream.c b/server/tests/test-stream.c
index ef5d607e6..d56109d14 100644
--- a/server/tests/test-stream.c
+++ b/server/tests/test-stream.c
@@ -66,6 +66,7 @@ sock_fd_read(int sock, void *buf, ssize_t bufsize, int *fd)
msg.msg_iovlen = 1;
msg.msg_control = cmsgu.control;
msg.msg_controllen = sizeof(cmsgu.control);
+ msg.msg_flags = 0;
size = recvmsg(sock, &msg, 0);
if (size < 0) {
perror ("recvmsg");
--
2.14.3
More information about the Spice-devel
mailing list