Parcourir la source

[master] fix build failure due to 'no return' error after assert().

okayed by muks on jabber.
JINMEI Tatuya il y a 13 ans
Parent
commit
28ec5cffac
1 fichiers modifiés avec 3 ajouts et 3 suppressions
  1. 3 3
      src/lib/datasrc/memory_datasrc.cc

+ 3 - 3
src/lib/datasrc/memory_datasrc.cc

@@ -1315,12 +1315,12 @@ getAdditionalName(RRType rrtype, const rdata::Rdata& rdata) {
     if (rrtype == RRType::NS()) {
         const generic::NS& ns = dynamic_cast<const generic::NS&>(rdata);
         return (ns.getNSName());
-    } else if (rrtype == RRType::MX()) {
+    } else {
+        // In our usage the only other possible case is MX.
+        assert(rrtype == RRType::MX());
         const generic::MX& mx = dynamic_cast<const generic::MX&>(rdata);
         return (mx.getMXName());
     }
-    // In our usage this shouldn't happen.
-    assert(false);
 }
 
 bool