tests: prevent unsigned integer underflow in TestUdpFactory/Blacklist
Change-Id: If00bb69fc2ddaded91c199c6ba17d94e12b1ffea
diff --git a/tests/daemon/face/udp-factory.t.cpp b/tests/daemon/face/udp-factory.t.cpp
index 01a24a0..4ef1451 100644
--- a/tests/daemon/face/udp-factory.t.cpp
+++ b/tests/daemon/face/udp-factory.t.cpp
@@ -456,9 +456,11 @@
parseConfig(CONFIG, false);
auto udpMcastFaces = this->listUdp4McastFaces();
- BOOST_CHECK_GE(udpMcastFaces.size(), netifsV4.size() - 1);
+ if (!netifsV4.empty())
+ BOOST_CHECK_GE(udpMcastFaces.size(), netifsV4.size() - 1);
auto udpMcastFacesV6 = this->listUdp6McastFaces();
- BOOST_CHECK_GE(udpMcastFacesV6.size(), netifsV6.size() - 1);
+ if (!netifsV6.empty())
+ BOOST_CHECK_GE(udpMcastFacesV6.size(), netifsV6.size() - 1);
udpMcastFaces.insert(udpMcastFaces.end(), udpMcastFacesV6.begin(), udpMcastFacesV6.end());
BOOST_CHECK_LT(udpMcastFaces.size(), netifsV4.size() + netifsV6.size());
BOOST_CHECK(std::none_of(udpMcastFaces.begin(), udpMcastFaces.end(),