Skip to content

Commit

Permalink
Convert addr family type just in case
Browse files Browse the repository at this point in the history
  • Loading branch information
DoumanAsh authored and ghedo committed Jan 10, 2025
1 parent d249d3f commit beb3f11
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions quiche/src/ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1840,7 +1840,7 @@ fn optional_std_addr_from_c(
}

fn std_addr_from_c(addr: &sockaddr, addr_len: socklen_t) -> SocketAddr {
match addr.sa_family {
match addr.sa_family as _ {
AF_INET => {
assert!(addr_len as usize == std::mem::size_of::<sockaddr_in>());

Expand Down Expand Up @@ -2033,9 +2033,9 @@ mod tests {
let dst = s.into_raw();

inet_ntop(
AF_INET,
AF_INET as _,
&((*in_addr).sin_addr) as *const _ as *const c_void,
dst,
dst as _,
16,
);

Expand Down Expand Up @@ -2077,9 +2077,9 @@ mod tests {
let dst = s.into_raw();

inet_ntop(
AF_INET6,
AF_INET6 as _,
&((*in6_addr).sin6_addr) as *const _ as *const c_void,
dst,
dst as _,
45,
);

Expand Down

0 comments on commit beb3f11

Please sign in to comment.