summaryrefslogtreecommitdiffhomepage
path: root/test/syscalls/linux/tuntap.cc
diff options
context:
space:
mode:
Diffstat (limited to 'test/syscalls/linux/tuntap.cc')
-rw-r--r--test/syscalls/linux/tuntap.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/syscalls/linux/tuntap.cc b/test/syscalls/linux/tuntap.cc
index 13ed0d68a..93ee11870 100644
--- a/test/syscalls/linux/tuntap.cc
+++ b/test/syscalls/linux/tuntap.cc
@@ -397,8 +397,7 @@ TEST_F(TuntapTest, SendUdpTriggersArpResolution) {
.sin_port = htons(42),
.sin_addr = {.s_addr = kTapPeerIPAddr},
};
- ASSERT_THAT(sendto(sock, "hello", 5, 0, reinterpret_cast<sockaddr*>(&remote),
- sizeof(remote)),
+ ASSERT_THAT(sendto(sock, "hello", 5, 0, AsSockAddr(&remote), sizeof(remote)),
SyscallSucceeds());
struct inpkt {
@@ -498,7 +497,7 @@ TEST_F(TuntapTest, WriteHangBug155928773) {
.sin_addr = {.s_addr = kTapIPAddr},
};
// Return values do not matter in this test.
- connect(sock, reinterpret_cast<struct sockaddr*>(&remote), sizeof(remote));
+ connect(sock, AsSockAddr(&remote), sizeof(remote));
write(sock, "hello", 5);
}