From: bert hubert Date: Wed, 11 Mar 2015 10:58:33 +0000 (+0100) Subject: slight speedup in checking empty SuffixMatchNodes X-Git-Tag: dnsdist-1.0.0-alpha1~248^2~88^2~55 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=08199f789ed83718e864af3fc5c0e1703516f736;p=thirdparty%2Fpdns.git slight speedup in checking empty SuffixMatchNodes --- diff --git a/pdns/dnsname.hh b/pdns/dnsname.hh index ec61a04d9f..b83a183f0e 100644 --- a/pdns/dnsname.hh +++ b/pdns/dnsname.hh @@ -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()); }