summaryrefslogtreecommitdiffhomepage
path: root/test/syscalls/linux/proc_net.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/syscalls/linux/proc_net.cc')
-rw-r--r--test/syscalls/linux/proc_net.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/test/syscalls/linux/proc_net.cc b/test/syscalls/linux/proc_net.cc
index 20f1dc305..cf5c25017 100644
--- a/test/syscalls/linux/proc_net.cc
+++ b/test/syscalls/linux/proc_net.cc
@@ -263,9 +263,8 @@ TEST(ProcNetSnmp, TcpEstab_NoRandomSave) {
// Get the port bound by the listening socket.
socklen_t addrlen = sizeof(sin);
- ASSERT_THAT(
- getsockname(s_listen.get(), reinterpret_cast<sockaddr*>(&sin), &addrlen),
- SyscallSucceeds());
+ ASSERT_THAT(getsockname(s_listen.get(), AsSockAddr(&sin), &addrlen),
+ SyscallSucceeds());
FileDescriptor s_connect =
ASSERT_NO_ERRNO_AND_VALUE(Socket(AF_INET, SOCK_STREAM, 0));
@@ -384,9 +383,8 @@ TEST(ProcNetSnmp, UdpIn_NoRandomSave) {
SyscallSucceeds());
// Get the port bound by the server socket.
socklen_t addrlen = sizeof(sin);
- ASSERT_THAT(
- getsockname(server.get(), reinterpret_cast<sockaddr*>(&sin), &addrlen),
- SyscallSucceeds());
+ ASSERT_THAT(getsockname(server.get(), AsSockAddr(&sin), &addrlen),
+ SyscallSucceeds());
FileDescriptor client =
ASSERT_NO_ERRNO_AND_VALUE(Socket(AF_INET, SOCK_DGRAM, 0));