]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Fix the mockup implementation of checkParameterBound in our unit tests
authorRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 15 Dec 2021 16:05:07 +0000 (17:05 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Wed, 22 Dec 2021 08:30:44 +0000 (09:30 +0100)
pdns/dnsdistdist/test-dnsdistrules_cc.cc

index c075c86dae43344b6557a0252b38fc3363103ceb..e27e6f6afe641027d9db55c034de769f7070d9d7 100644 (file)
@@ -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<uint16_t>::max()) {
+  if (value > max) {
     throw std::runtime_error("The value passed to " + parameter + " is too large, the maximum is " + std::to_string(max));
   }
 }