mirror of
https://github.com/qemu/qemu.git
synced 2024-11-23 19:03:38 +08:00
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>
This commit is contained in:
parent
a59100a9b0
commit
651ccdfa8e
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user