aboutsummaryrefslogtreecommitdiff
path: root/io
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2023-02-21 16:47:48 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2023-03-13 15:23:37 +0400
commit651ccdfa8e31fb06c1f589126db42fa756055a7a (patch)
treecf191fb3a629b114bce0552def622b08bbfed5aa /io
parenta59100a9b0733149484d52af61db69f1bf4db60e (diff)
downloadqemu-651ccdfa8e31fb06c1f589126db42fa756055a7a.zip
qemu-651ccdfa8e31fb06c1f589126db42fa756055a7a.tar.gz
qemu-651ccdfa8e31fb06c1f589126db42fa756055a7a.tar.bz2
io: 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-4-marcandre.lureau@redhat.com>
Diffstat (limited to 'io')
-rw-r--r--io/channel-socket.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/io/channel-socket.c b/io/channel-socket.c
index 7aca84f..2040297 100644
--- a/io/channel-socket.c
+++ b/io/channel-socket.c
@@ -159,7 +159,7 @@ int qio_channel_socket_connect_sync(QIOChannelSocket *ioc,
trace_qio_channel_socket_connect_complete(ioc, fd);
if (qio_channel_socket_set_fd(ioc, fd, errp) < 0) {
- close(fd);
+ closesocket(fd);
return -1;
}
@@ -233,7 +233,7 @@ int qio_channel_socket_listen_sync(QIOChannelSocket *ioc,
trace_qio_channel_socket_listen_complete(ioc, fd);
if (qio_channel_socket_set_fd(ioc, fd, errp) < 0) {
- close(fd);
+ closesocket(fd);
return -1;
}
qio_channel_set_feature(QIO_CHANNEL(ioc), QIO_CHANNEL_FEATURE_LISTEN);
@@ -310,7 +310,7 @@ int qio_channel_socket_dgram_sync(QIOChannelSocket *ioc,
trace_qio_channel_socket_dgram_complete(ioc, fd);
if (qio_channel_socket_set_fd(ioc, fd, errp) < 0) {
- close(fd);
+ closesocket(fd);
return -1;
}