summaryrefslogtreecommitdiff
path: root/server/XfrmControllerTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'server/XfrmControllerTest.cpp')
-rw-r--r--server/XfrmControllerTest.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/server/XfrmControllerTest.cpp b/server/XfrmControllerTest.cpp
index 07db8444..dea1584b 100644
--- a/server/XfrmControllerTest.cpp
+++ b/server/XfrmControllerTest.cpp
@@ -157,11 +157,11 @@ TEST_F(XfrmControllerTest, TestIpSecAllocateSpi) {
EXPECT_EQ(AF_INET, userspi.info.sel.family);
- xfrm_address_t saddr;
+ xfrm_address_t saddr{};
inet_pton(AF_INET, "127.0.0.1", reinterpret_cast<void*>(&saddr));
EXPECT_EQ(0, memcmp(&saddr, &userspi.info.saddr, sizeof(xfrm_address_t)));
- xfrm_address_t daddr;
+ xfrm_address_t daddr{};
inet_pton(AF_INET, "8.8.8.8", reinterpret_cast<void*>(&daddr));
EXPECT_EQ(0, memcmp(&daddr, &userspi.info.id.daddr, sizeof(xfrm_address_t)));
@@ -206,11 +206,11 @@ TEST_F(XfrmControllerTest, TestIpSecAllocateSpiIpv6) {
EXPECT_EQ(AF_INET6, userspi.info.sel.family);
- xfrm_address_t saddr;
+ xfrm_address_t saddr{};
inet_pton(AF_INET6, "::1", reinterpret_cast<void*>(&saddr));
EXPECT_EQ(0, memcmp(&saddr, &userspi.info.saddr, sizeof(xfrm_address_t)));
- xfrm_address_t daddr;
+ xfrm_address_t daddr{};
inet_pton(AF_INET6, "2001:4860:4860::8888", reinterpret_cast<void*>(&daddr));
EXPECT_EQ(0, memcmp(&daddr, &userspi.info.id.daddr, sizeof(xfrm_address_t)));
@@ -378,7 +378,7 @@ TEST_F(XfrmControllerTest, TestIpSecDeleteSecurityAssociation) {
netdutils::extract(nlMsgSlice, said);
EXPECT_EQ(htonl(DROID_SPI), said.spi);
- xfrm_address_t daddr;
+ xfrm_address_t daddr{};
inet_pton(AF_INET, "8.8.8.8", reinterpret_cast<void*>(&daddr));
EXPECT_EQ(0, memcmp(&daddr, &said.daddr, sizeof(xfrm_address_t)));