From fb8dcbe9101fc3a2af890964081b649e3b655c71 Mon Sep 17 00:00:00 2001 From: bert hubert Date: Wed, 23 Apr 2014 23:38:07 +0200 Subject: [PATCH] the ever vigilant Job Snijders spotted a typo & general lack of comments --- pdns/dns.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pdns/dns.cc b/pdns/dns.cc index db23944a28..1b0b30984b 100644 --- a/pdns/dns.cc +++ b/pdns/dns.cc @@ -128,7 +128,7 @@ bool dnspacketLessThan(const std::string& a, const std::string& b) return boost::tie(aQtype, aQclass) < boost::tie(bQtype, bQclass); } -// goal is to has based purely on the question name, and turn error into 'default' +// goal is to hash based purely on the question name, and turn error into 'default' uint32_t hashQuestion(const char* packet, uint16_t len, uint32_t init) { if(len < 12) @@ -140,7 +140,7 @@ uint32_t hashQuestion(const char* packet, uint16_t len, uint32_t init) unsigned char labellen; while((labellen=*pos++) && pos < end) { - if(pos + labellen + 1> end) + if(pos + labellen + 1 > end) // include length field in hash return 0; ret=burtle(pos, labellen+1, ret); pos += labellen; -- 2.47.2