From 8336411895ebf5e8f816e0ba4b02524909a8a49c Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Wed, 27 Jun 2018 15:21:09 +0200 Subject: [PATCH] dnsdist: Remove an unused local variable in getEDNSOptionsStart() --- pdns/dnsdist-ecs.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pdns/dnsdist-ecs.cc b/pdns/dnsdist-ecs.cc index a38f45a10e..158a7352d6 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; -- 2.47.2