]> granicus.if.org Git - pdns/commitdiff
dnsdist: Remove an unused local variable in getEDNSOptionsStart()
authorRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 27 Jun 2018 13:21:09 +0000 (15:21 +0200)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 4 Jul 2018 08:38:14 +0000 (10:38 +0200)
pdns/dnsdist-ecs.cc

index a38f45a10e9cd1c8c2165f1ff374bd99ddaca40c..158a7352d630c05128b914ea978d594a8d0b46c6 100644 (file)
@@ -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;