Skip to content

Commit

Permalink
more clang-tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
Habbie committed Mar 25, 2024
1 parent 4ec1794 commit f831a2e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pdns/gss_context.hh
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ public:

private:
#ifdef ENABLE_GSS_TSIG
OM_uint32 d_maj, d_min;
OM_uint32 d_maj{0}, d_min{0};
gss_name_t d_name;
#endif
}; // GssName
Expand Down
7 changes: 4 additions & 3 deletions pdns/rfc2136handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -731,8 +731,9 @@ int PacketHandler::processUpdate(DNSPacket& packet) { // NOLINT(readability-func
return RCode::Refused;
}

if (tsigKeys.size() == 0 && packet.d_havetsig)
if (tsigKeys.empty() && packet.d_havetsig) {
g_log<<Logger::Warning<<msgPrefix<<"TSIG is provided, but domain is not secured with TSIG. Processing continues"<<endl;
}

}

Expand All @@ -757,7 +758,7 @@ int PacketHandler::processUpdate(DNSPacket& packet) { // NOLINT(readability-func

DomainInfo di;
di.backend=nullptr;
if(!B.getDomainInfo(packet.qdomain, di) || !di.backend) {
if(!B.getDomainInfo(packet.qdomain, di) || (di.backend == nullptr)) {
g_log<<Logger::Error<<msgPrefix<<"Can't determine backend for domain '"<<packet.qdomain<<"' (or backend does not support DNS update operation)"<<endl;
return RCode::NotAuth;
}
Expand Down Expand Up @@ -904,7 +905,7 @@ int PacketHandler::processUpdate(DNSPacket& packet) { // NOLINT(readability-func
if (rr->d_place == DNSResourceRecord::AUTHORITY) {
/* see if it's permitted by policy */
if (this->d_update_policy_lua != nullptr) {
if (this->d_update_policy_lua->updatePolicy(rr->d_name, QType(rr->d_type), di.zone, packet) == false) {
if (!this->d_update_policy_lua->updatePolicy(rr->d_name, QType(rr->d_type), di.zone, packet)) {
g_log<<Logger::Warning<<msgPrefix<<"Refusing update for " << rr->d_name << "/" << QType(rr->d_type).toString() << ": Not permitted by policy"<<endl;
continue;
} else {
Expand Down

0 comments on commit f831a2e

Please sign in to comment.