]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: Apply suggestion from Otto (unsigned -> double) 12114/head
authorRemi Gacogne <github@coredump.fr>
Tue, 15 Nov 2022 11:32:40 +0000 (12:32 +0100)
committerGitHub <noreply@github.com>
Tue, 15 Nov 2022 11:32:40 +0000 (12:32 +0100)
Co-authored-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
pdns/dnsdistdist/dnsdist-backend.cc

index 916df4d03e80e93a537b96e91b8b684a9c6bf9ba..61e1b5c2098bccd12b972f0c843f9175c7b03459 100644 (file)
@@ -587,7 +587,7 @@ void DownstreamState::updateNextLazyHealthCheck(LazyHealthCheckStats& stats)
     else {
       time_t backOff = d_config.d_lazyHealthCheckMaxBackOff;
       const uint16_t failedTests = currentCheckFailures;
-      double backOffCoeffTmp = std::pow(2U, failedTests);
+      double backOffCoeffTmp = std::pow(2.0, failedTests);
       if (backOffCoeffTmp != HUGE_VAL && backOffCoeffTmp <= std::numeric_limits<time_t>::max()) {
         time_t backOffCoeff = static_cast<time_t>(backOffCoeffTmp);
         if ((std::numeric_limits<time_t>::max() / d_config.d_lazyHealthCheckFailedInterval) >= backOffCoeff) {