From e125fc6920b89eeb49fee8d02576f9b48da81567 Mon Sep 17 00:00:00 2001 From: bert hubert Date: Wed, 5 Feb 2014 11:35:33 +0100 Subject: [PATCH] manual merge of Aki Tuomi's pull request #1263. Thanks! --- pdns/common_startup.cc | 2 +- pdns/dbdnsseckeeper.cc | 4 +--- pdns/dns.cc | 4 ++-- pdns/dnssecsigner.cc | 3 +-- pdns/lwres.cc | 14 +------------- pdns/signingpipe.cc | 4 ++-- pdns/syncres.cc | 2 ++ 7 files changed, 10 insertions(+), 23 deletions(-) diff --git a/pdns/common_startup.cc b/pdns/common_startup.cc index 7db509fb4d..f73afee001 100644 --- a/pdns/common_startup.cc +++ b/pdns/common_startup.cc @@ -252,7 +252,7 @@ void *qthread(void *number) // If we have SO_REUSEPORT then create a new port for all receiver threads // other than the first one. - if( number > 0 && NS->canReusePort() ) { + if( number != NULL && NS->canReusePort() ) { L<(offset)+" >= " + boost::lexical_cast(d_length)); + throw runtime_error("out of bounds: "+boost::lexical_cast(offset)+" >= " + boost::lexical_cast(d_length)); } private: const char* d_ptr; diff --git a/pdns/dnssecsigner.cc b/pdns/dnssecsigner.cc index e5d3de55c8..55b8fd8138 100644 --- a/pdns/dnssecsigner.cc +++ b/pdns/dnssecsigner.cc @@ -139,8 +139,7 @@ void fillOutRRSIG(DNSSECPrivateKey& dpk, const std::string& signQName, RRSIGReco rrc.d_signature=iter->second; return; } - else - ; // cerr<<"Miss!"<sign(msg); diff --git a/pdns/lwres.cc b/pdns/lwres.cc index 7c308e47a3..25718dfe63 100644 --- a/pdns/lwres.cc +++ b/pdns/lwres.cc @@ -1,6 +1,6 @@ /* PowerDNS Versatile Database Driven Nameserver - Copyright (C) 2002 - 2010 PowerDNS.COM BV + Copyright (C) 2002 - 2014 PowerDNS.COM BV This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as @@ -45,18 +45,6 @@ #include #include -string dns0x20(const std::string& in) -{ - string ret(in); - string::size_type len=ret.size(); - for(string::size_type pos = 0 ; pos < len; ++pos) { - if(isalpha(in[pos]) && dns_random(2)) - ret[pos]^=0x20; - } - // cerr<<"'"< '"< ChunkedSigningPipe::getChunk(bool final) d_chunks.pop_front(); if(d_chunks.empty()) d_chunks.push_back(vector()); - if(d_final && front.empty()) - ; // cerr<<"getChunk returning empty in final"<