From: Andreas Färber Date: Thu, 17 Apr 2014 16:19:14 +0000 (+0200) Subject: qtest: Assure that init_socket()'s listen() does not fail X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=a7ded163dbe548075d65219c6189f059da2d99bb;p=qemu.git 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: Stefan Hajnoczi Signed-off-by: Andreas Färber --- diff --git a/tests/libqtest.c b/tests/libqtest.c index 8155695848..232f781639 100644 --- a/tests/libqtest.c +++ b/tests/libqtest.c @@ -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; }