Skip to content

Commit

Permalink
dnsdist: Remove an unused local variable in getEDNSOptionsStart()
Browse files Browse the repository at this point in the history
  • Loading branch information
rgacogne committed Jul 4, 2018
1 parent 78e3ac9 commit 8336411
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pdns/dnsdist-ecs.cc
Expand Up @@ -214,8 +214,6 @@ int getEDNSOptionsStart(char* packet, const size_t offset, const size_t len, cha
if (pos >= len)
return ENOENT;

uint16_t qtype, qclass;

if ((pos + /* root */ 1 + DNS_TYPE_SIZE + DNS_CLASS_SIZE) >= len) {
return ENOENT;
}
Expand All @@ -226,7 +224,7 @@ int getEDNSOptionsStart(char* packet, const size_t offset, const size_t len, cha
}
pos += 1;

qtype = (const unsigned char)packet[pos]*256 + (const unsigned char)packet[pos+1];
uint16_t qtype = (const unsigned char)packet[pos]*256 + (const unsigned char)packet[pos+1];
pos += DNS_TYPE_SIZE;
pos += DNS_CLASS_SIZE;

Expand Down

0 comments on commit 8336411

Please sign in to comment.