]> granicus.if.org Git - pdns/commitdiff
slight speedup in checking empty SuffixMatchNodes
authorbert hubert <bert.hubert@netherlabs.nl>
Wed, 11 Mar 2015 10:58:33 +0000 (11:58 +0100)
committerbert hubert <bert.hubert@netherlabs.nl>
Wed, 11 Mar 2015 10:58:33 +0000 (11:58 +0100)
pdns/dnsname.hh

index ec61a04d9f6ec14421d6de86cf52c101058fce5f..b83a183f0eefdf52246cf0d0c3f1bd4bf2abb7ed 100644 (file)
@@ -107,6 +107,8 @@ struct SuffixMatchNode
 
   bool check(const DNSName& name)  const
   {
+    if(children.empty()) // speed up empty set
+      return endNode;
     return check(name.getRawLabels());
   }