From: Remi Gacogne Date: Wed, 27 Jun 2018 13:21:09 +0000 (+0200) Subject: dnsdist: Remove an unused local variable in getEDNSOptionsStart() X-Git-Tag: dnsdist-1.3.1~7^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8336411895ebf5e8f816e0ba4b02524909a8a49c;p=pdns dnsdist: Remove an unused local variable in getEDNSOptionsStart() --- diff --git a/pdns/dnsdist-ecs.cc b/pdns/dnsdist-ecs.cc index a38f45a10..158a7352d 100644 --- a/pdns/dnsdist-ecs.cc +++ b/pdns/dnsdist-ecs.cc @@ -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; } @@ -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;