From fea4599ab2048d2e717f9419e27e157ca31f32aa Mon Sep 17 00:00:00 2001 From: bert hubert Date: Fri, 26 Aug 2016 21:26:01 +0200 Subject: [PATCH] rename d_positions, remove unused "d_pos" --- pdns/dnswriter.cc | 16 ++++++++-------- pdns/dnswriter.hh | 4 +--- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/pdns/dnswriter.cc b/pdns/dnswriter.cc index ff628d76bd..7d818dfd65 100644 --- a/pdns/dnswriter.cc +++ b/pdns/dnswriter.cc @@ -30,7 +30,7 @@ #include DNSPacketWriter::DNSPacketWriter(vector& content, const DNSName& qname, uint16_t qtype, uint16_t qclass, uint8_t opcode) - : d_pos(0), d_content(content), d_qname(qname), d_canonic(false), d_lowerCase(false) + : d_content(content), d_qname(qname), d_canonic(false), d_lowerCase(false) { d_content.clear(); dnsheader dnsheader; @@ -47,7 +47,7 @@ DNSPacketWriter::DNSPacketWriter(vector& content, const DNSName& qname, memcpy(dptr, ptr, sizeof(dnsheader)); d_stuff=0; - d_positions.reserve(16); + d_namepositions.reserve(16); xfrName(qname, false); len=d_content.size(); @@ -236,9 +236,9 @@ uint16_t DNSPacketWriter::lookupName(const DNSName& name, uint16_t* matchLen) } if(l_verbose) - cout<<"Have "<* source=0; if(p < d_content.size()) source = &d_content; @@ -250,11 +250,11 @@ uint16_t DNSPacketWriter::lookupName(const DNSName& name, uint16_t* matchLen) if(l_verbose) { if(source == &d_content) { DNSName pname((const char*)&(*source)[0], (*source).size(), p, true); // only for debugging - cout<<"Looking at '"< lc; diff --git a/pdns/dnswriter.hh b/pdns/dnswriter.hh index 825083fe24..fd75c27b1a 100644 --- a/pdns/dnswriter.hh +++ b/pdns/dnswriter.hh @@ -114,8 +114,6 @@ public: void xfrBlobNoSpaces(const string& blob, int len=-1); void xfrHexBlob(const string& blob, bool keepReading=false); - uint16_t d_pos; - dnsheader* getHeader(); void getRecords(string& records); const vector& getRecordBeingWritten() { return d_record; } @@ -137,7 +135,7 @@ public: private: uint16_t lookupName(const DNSName& name, uint16_t* matchlen); - vector d_positions; + vector d_namepositions; // We declare 1 uint_16 in the public section, these 3 align on a 8-byte boundry uint16_t d_stuff; uint16_t d_sor; -- 2.47.2