[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v2 02/25] tests: use closesocket()
From: |
marcandre . lureau |
Subject: |
[PULL v2 02/25] tests: use closesocket() |
Date: |
Mon, 13 Mar 2023 15:46:25 +0400 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
Because they are actually sockets...
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20230221124802.4103554-3-marcandre.lureau@redhat.com>
---
tests/unit/socket-helpers.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
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);
--
2.39.2
- [PULL v2 00/25] Win socket patches, marcandre . lureau, 2023/03/13
- [PULL v2 01/25] util: drop qemu_fork(), marcandre . lureau, 2023/03/13
- [PULL v2 02/25] tests: use closesocket(),
marcandre . lureau <=
- [PULL v2 03/25] io: use closesocket(), marcandre . lureau, 2023/03/13
- [PULL v2 04/25] tests: add test-error-report, marcandre . lureau, 2023/03/13
- [PULL v2 06/25] win32/socket: introduce qemu_socket_select() helper, marcandre . lureau, 2023/03/13
- [PULL v2 07/25] win32/socket: introduce qemu_socket_unselect() helper, marcandre . lureau, 2023/03/13
- [PULL v2 05/25] error: add global &error_warn destination, marcandre . lureau, 2023/03/13
- [PULL v2 08/25] aio: make aio_set_fd_poll() static to aio-posix.c, marcandre . lureau, 2023/03/13
- [PULL v2 09/25] aio/win32: aio_set_fd_handler() only supports SOCKET, marcandre . lureau, 2023/03/13
- [PULL v2 10/25] main-loop: remove qemu_fd_register(), win32/slirp/socket specific, marcandre . lureau, 2023/03/13
- [PULL v2 11/25] slirp: unregister the win32 SOCKET, marcandre . lureau, 2023/03/13
- [PULL v2 12/25] slirp: open-code qemu_socket_(un)select(), marcandre . lureau, 2023/03/13