mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
tests: getsockname expects that addrlen will be initialized
PiperOrigin-RevId: 357224877
This commit is contained in:
@@ -2131,8 +2131,8 @@ TEST(UdpInet6SocketTest, ConnectInet4Sockaddr) {
|
||||
reinterpret_cast<const struct sockaddr*>(&connect_sockaddr),
|
||||
sizeof(sockaddr_in)),
|
||||
SyscallSucceeds());
|
||||
socklen_t len;
|
||||
sockaddr_storage sockname;
|
||||
socklen_t len = sizeof(sockaddr_storage);
|
||||
ASSERT_THAT(getsockname(sock_.get(),
|
||||
reinterpret_cast<struct sockaddr*>(&sockname), &len),
|
||||
SyscallSucceeds());
|
||||
|
||||
Reference in New Issue
Block a user