diff options
| author | Yi Kong <yikong@google.com> | 2018-07-25 13:26:10 -0700 |
|---|---|---|
| committer | Yi Kong <yikong@google.com> | 2018-07-25 13:26:10 -0700 |
| commit | bdfd57e5a3a21ac340016a70ea425e4223f23b08 (patch) | |
| tree | baab5276b89048e9f327b93bc4a5de07325d8287 /server/InterfaceControllerTest.cpp | |
| parent | 50fdf5a544b2f475082978df035e137223e3d454 (diff) | |
Modernize codebase by replacing NULL with nullptr
Fixes -Wzero-as-null-pointer-constant warning.
Test: m
Bug: 68236239
Change-Id: I226a0599db4f7c3557e55cade7869d00bd314949
Diffstat (limited to 'server/InterfaceControllerTest.cpp')
| -rw-r--r-- | server/InterfaceControllerTest.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/InterfaceControllerTest.cpp b/server/InterfaceControllerTest.cpp index 9f5c427f..78d507f2 100644 --- a/server/InterfaceControllerTest.cpp +++ b/server/InterfaceControllerTest.cpp @@ -183,7 +183,7 @@ TEST_F(GetIfaceListTest, IfaceNames) { EXPECT_EQ(ok, ifaceNames.status()); struct ifaddrs *ifaddr, *ifa; EXPECT_EQ(0, getifaddrs(&ifaddr)); - for (ifa = ifaddr; ifa != NULL; ifa = ifa->ifa_next) { + for (ifa = ifaddr; ifa != nullptr; ifa = ifa->ifa_next) { const auto val = std::find( ifaceNames.value().begin(), ifaceNames.value().end(), ifa->ifa_name); EXPECT_NE(ifaceNames.value().end(), val); @@ -196,7 +196,7 @@ TEST_F(GetIfaceListTest, IfaceExist) { EXPECT_EQ(ok, ifaceMap.status()); struct ifaddrs *ifaddr, *ifa; EXPECT_EQ(0, getifaddrs(&ifaddr)); - for (ifa = ifaddr; ifa != NULL; ifa = ifa->ifa_next) { + for (ifa = ifaddr; ifa != nullptr; ifa = ifa->ifa_next) { uint32_t ifaceIndex = if_nametoindex(ifa->ifa_name); const auto ifacePair = ifaceMap.value().find(ifa->ifa_name); EXPECT_NE(ifaceMap.value().end(), ifacePair); |
