From 568a800b36d1fe03f6f28382a3a89c8d5fa6a758 Mon Sep 17 00:00:00 2001 From: Otto Moerbeek Date: Mon, 15 May 2023 12:00:58 +0200 Subject: [PATCH] Process review comments --- .clang-tidy.full | 2 +- pdns/recursordist/rec-main.cc | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.clang-tidy.full b/.clang-tidy.full index e4a95882a6..43754f5983 100644 --- a/.clang-tidy.full +++ b/.clang-tidy.full @@ -253,7 +253,7 @@ CheckOptions: - key: modernize-pass-by-value.ValuesOnly value: 'false' - key: readability-function-cognitive-complexity.IgnoreMacros - value: 'false' + value: 'true' - key: modernize-loop-convert.IncludeStyle value: llvm - key: cert-str34-c.DiagnoseSignedUnsignedCharComparisons diff --git a/pdns/recursordist/rec-main.cc b/pdns/recursordist/rec-main.cc index cf09ccbb8a..d5f3108113 100644 --- a/pdns/recursordist/rec-main.cc +++ b/pdns/recursordist/rec-main.cc @@ -1254,7 +1254,7 @@ void broadcastFunction(const pipefunc_t& func) continue; } - ThreadMSG* tmsg = new ThreadMSG(); // NOLINT: manual onwership handling + ThreadMSG* tmsg = new ThreadMSG(); // NOLINT: manual ownership handling tmsg->func = func; tmsg->wantAnswer = true; if (write(threadInfo.pipes.writeToThread, &tmsg, sizeof(tmsg)) != sizeof(tmsg)) { // NOLINT: sizeof correct @@ -1348,7 +1348,7 @@ T broadcastAccFunction(const std::function& func) if (resp) { ret += *resp; - delete resp; // NOLINT: manual ownershipm handling + delete resp; // NOLINT: manual ownership handling resp = nullptr; } // coverity[leaked_storage] @@ -1915,7 +1915,6 @@ static int serviceMain(Logr::log_t log) // NOLINT(readability-function-cognitive initDontQuery(log); - /* this needs to be done before parseACLs(), which call broadcastFunction() */ RecThreadInfo::setWeDistributeQueries(::arg().mustDo("pdns-distributes-queries")); if (RecThreadInfo::weDistributeQueries()) { SLOG(g_log << Logger::Warning << "PowerDNS Recursor itself will distribute queries over threads" << endl, -- 2.47.2