Skip to content

Commit

Permalink
dnsdist: Fix a few warnings from Coverity
Browse files Browse the repository at this point in the history
  • Loading branch information
rgacogne committed Sep 13, 2024
1 parent 6913cd5 commit 1341a0a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pdns/dnsdistdist/bpf-filter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ BPFFilter::BPFFilter(std::unordered_map<std::string, MapConfiguration>& configs,
BPFFilter::MapConfiguration filters;
filters.d_maxItems = 1;
filters.d_type = BPFFilter::MapType::Filters;
maps->d_filters = BPFFilter::Map(filters, d_mapFormat);
maps->d_filters = BPFFilter::Map(std::move(filters), d_mapFormat);

const struct bpf_insn main_filter[] = {
#include "bpf-filter.main.ebpf"
Expand Down
1 change: 1 addition & 0 deletions pdns/dnsdistdist/dnsdist-web.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1908,6 +1908,7 @@ void setMaxConcurrentConnections(size_t max)
void WebserverThread(Socket sock)
{
setThreadName("dnsdist/webserv");
//coverity[auto_causes_copy]
const auto local = *dnsdist::configuration::getCurrentRuntimeConfiguration().d_webServerAddress;
infolog("Webserver launched on %s", local.toStringWithPort());

Expand Down
1 change: 1 addition & 0 deletions pdns/dnsdistdist/dnsdist.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2340,6 +2340,7 @@ static void healthChecksThread()

std::unique_ptr<FDMultiplexer> mplexer{nullptr};
// this points to the actual shared_ptrs!
//coverity[auto_causes_copy]
const auto servers = dnsdist::configuration::getCurrentRuntimeConfiguration().d_backends;
for (const auto& dss : servers) {
dss->updateStatisticsInfo();
Expand Down

0 comments on commit 1341a0a

Please sign in to comment.