From f831a2e8db855a397ee74e26ba894d89a8303247 Mon Sep 17 00:00:00 2001 From: Peter van Dijk Date: Mon, 25 Mar 2024 12:17:55 +0100 Subject: [PATCH] more clang-tidy --- pdns/gss_context.hh | 2 +- pdns/rfc2136handler.cc | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pdns/gss_context.hh b/pdns/gss_context.hh index ba2e545e92..f7fbcef333 100644 --- a/pdns/gss_context.hh +++ b/pdns/gss_context.hh @@ -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 diff --git a/pdns/rfc2136handler.cc b/pdns/rfc2136handler.cc index 4e30944e0f..f0d6e9361a 100644 --- a/pdns/rfc2136handler.cc +++ b/pdns/rfc2136handler.cc @@ -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<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<d_name << "/" << QType(rr->d_type).toString() << ": Not permitted by policy"<