diff options
author | Andreas Färber <afaerber@suse.de> | 2014-04-17 18:19:14 +0200 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2014-05-05 20:58:33 +0200 |
commit | a7ded163dbe548075d65219c6189f059da2d99bb (patch) | |
tree | 174c81637f091ba85a4ae64768091e6d5e94eb97 /tests/libqtest.c | |
parent | 4688c94c1f59b8df45079391e26569d0615ab7af (diff) | |
download | qemu-a7ded163dbe548075d65219c6189f059da2d99bb.zip qemu-a7ded163dbe548075d65219c6189f059da2d99bb.tar.gz qemu-a7ded163dbe548075d65219c6189f059da2d99bb.tar.bz2 |
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 <stefanha@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'tests/libqtest.c')
-rw-r--r-- | tests/libqtest.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/libqtest.c b/tests/libqtest.c index 8155695..232f781 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; } |