Skip to content

Commit

Permalink
Inline cmd_io value
Browse files Browse the repository at this point in the history
  • Loading branch information
RReverser committed Aug 26, 2024
1 parent e37ada7 commit 72e1855
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/discovery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,13 @@ pub(crate) async fn bind_socket(
ioctlsocket, WSAGetLastError, SIO_UDP_CONNRESET,
};

let mut cmd_io: u32 = 0;

unsafe {
#[allow(
clippy::as_conversions,
clippy::cast_possible_truncation,
clippy::cast_possible_wrap
)]
match ioctlsocket(
socket.as_raw_socket() as _,
SIO_UDP_CONNRESET as _,
&mut cmd_io,
) {
match ioctlsocket(socket.as_raw_socket() as _, SIO_UDP_CONNRESET as _, &mut 0) {
0_i32 => Ok(()),
_ => Err(WSAGetLastError()),
}
Expand Down

0 comments on commit 72e1855

Please sign in to comment.