Skip to content

Commit

Permalink
dnsdist: Fix a clang-tidy warning in bpf-filter.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
rgacogne committed Sep 12, 2024
1 parent 8524623 commit bf68249
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions pdns/dnsdistdist/bpf-filter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@

static __u64 ptr_to_u64(const void* ptr)
{
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-cstyle-cast)
return (__u64)(unsigned long)ptr;
}

Expand Down Expand Up @@ -195,8 +196,8 @@ struct QNameValue
uint16_t qtype{0};
};

BPFFilter::Map::Map(const BPFFilter::MapConfiguration& config, BPFFilter::MapFormat format) :
d_config(config)
BPFFilter::Map::Map(BPFFilter::MapConfiguration config, BPFFilter::MapFormat format) :
d_config(std::move(config))
{
if (d_config.d_type == BPFFilter::MapType::Filters) {
/* special case, this is a map of eBPF programs */
Expand Down
2 changes: 1 addition & 1 deletion pdns/dnsdistdist/bpf-filter.hh
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ private:
Map()
{
}
Map(const MapConfiguration&, MapFormat);
Map(MapConfiguration, MapFormat);
MapConfiguration d_config;
uint32_t d_count{0};
FDWrapper d_fd;
Expand Down

0 comments on commit bf68249

Please sign in to comment.