From 28ed71086538310bf000071b2d86a1a0fddc35fe Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Fri, 14 Jun 2019 14:02:27 +0200 Subject: [PATCH] SuffixMatchTree: Remove useless code duplication --- pdns/dnsname.hh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pdns/dnsname.hh b/pdns/dnsname.hh index f9e1d0ba3..581c0d492 100644 --- a/pdns/dnsname.hh +++ b/pdns/dnsname.hh @@ -336,11 +336,7 @@ struct SuffixMatchTree return nullptr; } - auto result = lookup(name.getRawLabels()); - if (result) { - return result; - } - return endNode ? &d_value : nullptr; + return lookup(name.getRawLabels()); } T* lookup(std::vector labels) const -- 2.40.0