From: bert hubert Date: Wed, 23 Apr 2014 21:38:07 +0000 (+0200) Subject: the ever vigilant Job Snijders spotted a typo & general lack of comments X-Git-Tag: rec-3.6.0-rc1~44 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fb8dcbe9101fc3a2af890964081b649e3b655c71;p=pdns the ever vigilant Job Snijders spotted a typo & general lack of comments --- diff --git a/pdns/dns.cc b/pdns/dns.cc index db23944a2..1b0b30984 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;