[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 02/16] tests: use closesocket()
From: |
marcandre . lureau |
Subject: |
[PATCH v3 02/16] tests: use closesocket() |
Date: |
Tue, 21 Feb 2023 16:47:47 +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>
---
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
- [PATCH v3 00/16] win32: do not mix SOCKET and fd space, marcandre . lureau, 2023/02/21
- [PATCH v3 01/16] util: drop qemu_fork(), marcandre . lureau, 2023/02/21
- [PATCH v3 02/16] tests: use closesocket(),
marcandre . lureau <=
- [PATCH v3 03/16] io: use closesocket(), marcandre . lureau, 2023/02/21
- [PATCH v3 04/16] tests: add test-error-report, marcandre . lureau, 2023/02/21
- [PATCH v3 05/16] error: add global &error_warn destination, marcandre . lureau, 2023/02/21
- [PATCH v3 06/16] win32/socket: introduce qemu_socket_select() helper, marcandre . lureau, 2023/02/21
- [PATCH v3 07/16] win32/socket: introduce qemu_socket_unselect() helper, marcandre . lureau, 2023/02/21
- [PATCH v3 08/16] aio: make aio_set_fd_poll() static to aio-posix.c, marcandre . lureau, 2023/02/21
- [PATCH v3 10/16] RFC: build-sys: add slirp.wrap, marcandre . lureau, 2023/02/21
- [PATCH v3 09/16] aio/win32: aio_set_fd_handler() only supports SOCKET, marcandre . lureau, 2023/02/21
- [PATCH v3 13/16] slirp: open-code qemu_socket_(un)select(), marcandre . lureau, 2023/02/21