From: Peter van Dijk Date: Mon, 25 Mar 2024 11:17:55 +0000 (+0100) Subject: more clang-tidy X-Git-Tag: rec-5.1.0-alpha1~88^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F13770%2Fhead;p=thirdparty%2Fpdns.git more clang-tidy --- 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"<