]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
auth: remove dead return statements 11083/head
authorChris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
Wed, 8 Dec 2021 20:36:34 +0000 (21:36 +0100)
committerChris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
Wed, 8 Dec 2021 20:36:53 +0000 (21:36 +0100)
modules/bindbackend/bindbackend2.cc
modules/bindbackend/binddnssec.cc
modules/godbcbackend/sodbc.cc
pdns/backends/gsql/gsqlbackend.cc
pdns/resolver.cc

index c7a2a007ed3d4f8f0547fce6a37c25c3fae7e598..2987ee5b7712e468d8f5f251d4bf5a861cd5f321 100644 (file)
@@ -221,7 +221,6 @@ bool Bind2Backend::startTransaction(const DNSName& qname, int id)
     int fd = mkstemp(&d_transaction_tmpname.at(0));
     if (fd == -1) {
       throw DBException("Unable to create a unique temporary zonefile '" + d_transaction_tmpname + "': " + stringerror());
-      return false;
     }
 
     d_of = std::make_unique<ofstream>(d_transaction_tmpname);
index 4d116da152899b4bc18e7aee5fefb4df60512d1b..9e8cbefa50d4223f0afb2e0b6c87f61d33034f20 100644 (file)
@@ -382,8 +382,6 @@ bool Bind2Backend::addDomainKey(const DNSName& name, const KeyData& key, int64_t
     id = -2;
     return true;
   }
-
-  return false;
 }
 
 bool Bind2Backend::activateDomainKey(const DNSName& name, unsigned int id)
index a1a7ad0255bf8f6955683deb2e5e48a1bd012ff4..3db686fccaa139813bf7ed71478840e72f826813 100644 (file)
@@ -395,7 +395,6 @@ SSqlStatement* SODBCStatement::nextRow(row_t& row)
 
   SQLFreeStmt(d_statement, SQL_CLOSE);
   throw SSqlException("Should not get here.");
-  return this;
 }
 
 // Constructor.
index be0c594155f485a517847581c8b840a7c133864f..4bb6e9c617566ed67ae9f223d378049d8feb20f0 100644 (file)
@@ -572,7 +572,6 @@ bool GSQLBackend::updateEmptyNonTerminals(uint32_t domain_id, set<DNSName>& inse
     }
     catch (SSqlException &e) {
       throw PDNSException("GSQLBackend unable to delete empty non-terminal records from domain_id "+itoa(domain_id)+": "+e.txtReason());
-      return false;
     }
   }
   else
@@ -589,7 +588,6 @@ bool GSQLBackend::updateEmptyNonTerminals(uint32_t domain_id, set<DNSName>& inse
       }
       catch (SSqlException &e) {
         throw PDNSException("GSQLBackend unable to delete empty non-terminal rr '"+qname.toLogString()+"' from domain_id "+itoa(domain_id)+": "+e.txtReason());
-        return false;
       }
     }
   }
@@ -608,7 +606,6 @@ bool GSQLBackend::updateEmptyNonTerminals(uint32_t domain_id, set<DNSName>& inse
     }
     catch (SSqlException &e) {
       throw PDNSException("GSQLBackend unable to insert empty non-terminal rr '"+qname.toLogString()+"' in domain_id "+itoa(domain_id)+": "+e.txtReason());
-      return false;
     }
   }
 
@@ -775,8 +772,6 @@ bool GSQLBackend::addDomainKey(const DNSName& name, const KeyData& key, int64_t&
     id = -2;
     return true;
   }
-
-  return false;
 }
 
 bool GSQLBackend::activateDomainKey(const DNSName& name, unsigned int id)
@@ -1849,8 +1844,6 @@ bool GSQLBackend::searchRecords(const string &pattern, int maxResults, vector<DN
   catch (SSqlException &e) {
     throw PDNSException("GSQLBackend unable to search for records with pattern '" + pattern + "' (escaped pattern '" + escaped_pattern + "'): "+e.txtReason());
   }
-
-  return false;
 }
 
 bool GSQLBackend::searchComments(const string &pattern, int maxResults, vector<Comment>& result)
@@ -1882,8 +1875,6 @@ bool GSQLBackend::searchComments(const string &pattern, int maxResults, vector<C
   catch (SSqlException &e) {
     throw PDNSException("GSQLBackend unable to search for comments with pattern '" + pattern + "' (escaped pattern '" + escaped_pattern + "'): "+e.txtReason());
   }
-
-  return false;
 }
 
 void GSQLBackend::extractRecord(SSqlStatement::row_t& row, DNSResourceRecord& r)
index 6377008645d0293c0172b3d6b1c3be8b1092cc0f..96f85c3673e7dcb8851d49e5026bc243b9b2d0ee 100644 (file)
@@ -336,7 +336,6 @@ int Resolver::resolve(const ComboAddress& to, const DNSName &domain, int type, R
   catch(ResolverException &re) {
     throw ResolverException(re.reason+" from "+to.toLogString());
   }
-  return -1;
 }
 
 int Resolver::resolve(const ComboAddress& ipport, const DNSName &domain, int type, Resolver::res_t* res) {