Browse files

Use NoThrow API for ::firstAddress().

  • Loading branch information...
1 parent 0368080 commit 29d19fc80a4b5cccb714ad70b52c17a9a2785568 @pprindeville committed Jan 1, 2013
Showing with 4 additions and 4 deletions.
  1. +4 −4 Net/testsuite/src/NetworkInterfaceTest.cpp
View
8 Net/testsuite/src/NetworkInterfaceTest.cpp
@@ -151,15 +151,15 @@ void NetworkInterfaceTest::testForAddress()
// not all interfaces have IP configured
if (it->second.addressList().empty()) continue;
- IPAddress first = it->second.firstAddress(IPAddress::IPv4);
- if (it->second.supportsIPv4())
+ IPAddress first = it->second.firstAddressNoThrow(IPAddress::IPv4);
+ if (!first.isWildcard())
{
- NetworkInterface ifc = NetworkInterface::forAddress(it->second.firstAddress(IPAddress::IPv4));
+ NetworkInterface ifc = NetworkInterface::forAddress(first);
assert (ifc.firstAddress(IPAddress::IPv4) == it->second.firstAddress(IPAddress::IPv4));
IPAddress addr(IPAddress::IPv4);
assert (addr.isWildcard());
- it->second.firstAddress(addr, IPAddress::IPv4);
+ addr = it->second.firstAddressNoThrow(IPAddress::IPv4);
assert (!addr.isWildcard());
}
else

0 comments on commit 29d19fc

Please sign in to comment.