From: Marc-André Lureau Date: Tue, 21 Feb 2023 12:47:47 +0000 (+0400) Subject: tests: use closesocket() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=a59100a9b0733149484d52af61db69f1bf4db60e;p=qemu.git tests: use closesocket() Because they are actually sockets... Signed-off-by: Marc-André Lureau Reviewed-by: Thomas Huth Message-Id: <20230221124802.4103554-3-marcandre.lureau@redhat.com> --- diff --git a/tests/unit/socket-helpers.c b/tests/unit/socket-helpers.c index eecadf3a3c..914b3aa0cf 100644 --- a/tests/unit/socket-helpers.c +++ b/tests/unit/socket-helpers.c @@ -117,13 +117,13 @@ static int socket_can_bind_connect(const char *hostname, int family) cleanup: if (afd != -1) { - close(afd); + closesocket(afd); } if (cfd != -1) { - close(cfd); + closesocket(cfd); } if (lfd != -1) { - close(lfd); + closesocket(lfd); } if (res) { freeaddrinfo(res);