aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2023-02-21 16:47:47 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2023-03-13 15:23:37 +0400
commita59100a9b0733149484d52af61db69f1bf4db60e (patch)
tree1d7622b6530128f152ff1565eadc6eaec00662df /tests
parent8278e30c459e21db93c17d2182ad8352ec2dd4f9 (diff)
tests: use closesocket()
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>
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/socket-helpers.c6
1 files 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);