From: Remi Gacogne Date: Wed, 15 Dec 2021 16:05:07 +0000 (+0100) Subject: dnsdist: Fix the mockup implementation of checkParameterBound in our unit tests X-Git-Tag: auth-4.7.0-alpha1~103^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1f4950f4791975f8e6a0dd0573f0ed544070288a;p=thirdparty%2Fpdns.git dnsdist: Fix the mockup implementation of checkParameterBound in our unit tests --- 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)); } }