Skip to content

Commit

Permalink
slight speedup in checking empty SuffixMatchNodes
Browse files Browse the repository at this point in the history
  • Loading branch information
ahupowerdns committed Mar 11, 2015
1 parent 3bd38af commit 08199f7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pdns/dnsname.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}

Expand Down

0 comments on commit 08199f7

Please sign in to comment.