diff --git a/src/backend/libc/net/sockopt.rs b/src/backend/libc/net/sockopt.rs index bba12d10b..cff2ca288 100644 --- a/src/backend/libc/net/sockopt.rs +++ b/src/backend/libc/net/sockopt.rs @@ -84,7 +84,7 @@ fn getsockopt(fd: BorrowedFd<'_>, level: i32, optname: i32) -> io::Resu "Socket APIs don't ever use `bool` directly" ); - let mut value = MaybeUninit::::uninit(); + let mut value = MaybeUninit::::zeroed(); getsockopt_raw(fd, level, optname, &mut value, &mut optlen)?; // On Windows at least, `getsockopt` has been observed writing 1