From: Remi Gacogne Date: Fri, 10 Nov 2023 08:34:03 +0000 (+0100) Subject: dnsdist: More clang-tidy fixes X-Git-Tag: rec-5.0.0-rc1~48^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a3e167855f9d8f879e8c69ef78dcfcdb6ee3d680;p=thirdparty%2Fpdns.git dnsdist: More clang-tidy fixes --- diff --git a/pdns/dnsdist-lua-bindings-dnsquestion.cc b/pdns/dnsdist-lua-bindings-dnsquestion.cc index 0bec91aac8..933d1720b9 100644 --- a/pdns/dnsdist-lua-bindings-dnsquestion.cc +++ b/pdns/dnsdist-lua-bindings-dnsquestion.cc @@ -258,13 +258,13 @@ void setupLuaBindingsDNSQuestion(LuaContext& luaCtx) setEDNSOption(dq, code, data); }); - luaCtx.registerFunction& extraText)>("setExtendedDNSError", [](DNSQuestion& dq, uint16_t infoCode, const boost::optional& extraText) { + luaCtx.registerFunction& extraText)>("setExtendedDNSError", [](DNSQuestion& dnsQuestion, uint16_t infoCode, const boost::optional& extraText) { EDNSExtendedError ede; ede.infoCode = infoCode; if (extraText) { ede.extraText = *extraText; } - dq.ids.d_extendedError = std::make_unique(ede); + dnsQuestion.ids.d_extendedError = std::make_unique(ede); }); luaCtx.registerFunction("suspend", [](DNSQuestion& dq, uint16_t asyncID, uint16_t queryID, uint32_t timeoutMs) { @@ -515,13 +515,13 @@ private: return setNegativeAndAdditionalSOA(dq, nxd, DNSName(zone), ttl, DNSName(mname), DNSName(rname), serial, refresh, retry, expire, minimum, false); }); - luaCtx.registerFunction& extraText)>("setExtendedDNSError", [](DNSResponse& dr, uint16_t infoCode, const boost::optional& extraText) { + luaCtx.registerFunction& extraText)>("setExtendedDNSError", [](DNSResponse& dnsResponse, uint16_t infoCode, const boost::optional& extraText) { EDNSExtendedError ede; ede.infoCode = infoCode; if (extraText) { ede.extraText = *extraText; } - dr.ids.d_extendedError = std::make_unique(ede); + dnsResponse.ids.d_extendedError = std::make_unique(ede); }); luaCtx.registerFunction("suspend", [](DNSResponse& dr, uint16_t asyncID, uint16_t queryID, uint32_t timeoutMs) { diff --git a/pdns/dnsdistdist/dnsdist-lua-ffi.cc b/pdns/dnsdistdist/dnsdist-lua-ffi.cc index d2d960a947..afc53f4faf 100644 --- a/pdns/dnsdistdist/dnsdist-lua-ffi.cc +++ b/pdns/dnsdistdist/dnsdist-lua-ffi.cc @@ -465,14 +465,14 @@ void dnsdist_ffi_dnsquestion_set_http_response(dnsdist_ffi_dnsquestion_t* dq, ui #endif } -void dnsdist_ffi_dnsquestion_set_extended_dns_error(dnsdist_ffi_dnsquestion_t* dq, uint16_t infoCode, const char* extraText, size_t extraTextSize) +void dnsdist_ffi_dnsquestion_set_extended_dns_error(dnsdist_ffi_dnsquestion_t* dnsQuestion, uint16_t infoCode, const char* extraText, size_t extraTextSize) { EDNSExtendedError ede; ede.infoCode = infoCode; if (extraText != nullptr && extraTextSize > 0) { ede.extraText = std::string(extraText, extraTextSize); } - dq->dq->ids.d_extendedError = std::make_unique(ede); + dnsQuestion->dq->ids.d_extendedError = std::make_unique(ede); } void dnsdist_ffi_dnsquestion_set_rcode(dnsdist_ffi_dnsquestion_t* dq, int rcode)