From 1f4950f4791975f8e6a0dd0573f0ed544070288a Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Wed, 15 Dec 2021 17:05:07 +0100 Subject: [PATCH] dnsdist: Fix the mockup implementation of checkParameterBound in our unit tests --- pdns/dnsdistdist/test-dnsdistrules_cc.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdns/dnsdistdist/test-dnsdistrules_cc.cc b/pdns/dnsdistdist/test-dnsdistrules_cc.cc index c075c86dae..e27e6f6afe 100644 --- a/pdns/dnsdistdist/test-dnsdistrules_cc.cc +++ b/pdns/dnsdistdist/test-dnsdistrules_cc.cc @@ -10,7 +10,7 @@ void checkParameterBound(const std::string& parameter, uint64_t value, size_t max); void checkParameterBound(const std::string& parameter, uint64_t value, size_t max) { - if (value > std::numeric_limits::max()) { + if (value > max) { throw std::runtime_error("The value passed to " + parameter + " is too large, the maximum is " + std::to_string(max)); } } -- 2.47.3