提交 a7ded163 编写于 作者: A Andreas Färber

qtest: Assure that init_socket()'s listen() does not fail

In practice this seems very unlikely, so cleanup is neglected, as done
for bind().
Reviewed-by: NStefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: NAndreas Färber <afaerber@suse.de>
上级 4688c94c
......@@ -72,7 +72,8 @@ static int init_socket(const char *socket_path)
ret = bind(sock, (struct sockaddr *)&addr, sizeof(addr));
} while (ret == -1 && errno == EINTR);
g_assert_no_errno(ret);
listen(sock, 1);
ret = listen(sock, 1);
g_assert_no_errno(ret);
return sock;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册