From c0391c22e44f9cef35a13feaf211bbc0b16573b7 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Fri, 24 Nov 2023 16:16:52 +0100 Subject: [PATCH] dnsdist: Explain to clang-tidy that resizing a moved vector is fine --- pdns/dnsdist.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/pdns/dnsdist.cc b/pdns/dnsdist.cc index 0e92d99823..8aba1e2b70 100644 --- a/pdns/dnsdist.cc +++ b/pdns/dnsdist.cc @@ -787,6 +787,7 @@ void responderThread(std::shared_ptr dss) for (const auto& fd : sockets) { /* allocate one more byte so we can detect truncation */ + // NOLINTNEXTLINE(bugprone-use-after-move): resizing a vector has no preconditions so it is valid to do so after moving it response.resize(initialBufferSize + 1); ssize_t got = recv(fd, response.data(), response.size(), 0); -- 2.47.2