]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Reformt
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Tue, 21 May 2024 09:50:04 +0000 (11:50 +0200)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Thu, 23 May 2024 07:05:29 +0000 (09:05 +0200)
(cherry picked from commit 2759618132061d8cc543c1f25ff29b5db1936392)

pdns/mplexer.hh
pdns/recursordist/ratelimitedlog.hh
pdns/recursordist/rec-main.cc

index 1ad2c379e20cd5b205704f65ed14297325214801..6a84551ab9b343ce1101311b2c7518abd4cdbfd5 100644 (file)
@@ -82,7 +82,8 @@ public:
      minimum value of maxEventsHint and s_maxevents, to reduce memory usage. */
   static FDMultiplexer* getMultiplexerSilent(unsigned int maxEventsHint = s_maxevents);
 
-  struct InRun {
+  struct InRun
+  {
     InRun(const InRun&) = delete;
     InRun(InRun&&) = delete;
     InRun& operator=(const InRun&) = delete;
@@ -95,7 +96,8 @@ public:
       }
       d_inrun = true;
     }
-    ~InRun() {
+    ~InRun()
+    {
       d_inrun = false;
     }
     bool& d_inrun;
index b84d39a705ee4468fb05ab5de6583bd558840105..c390ffa081592b9ba2c26a212d2abeb1cb05767c 100644 (file)
@@ -86,7 +86,8 @@ private:
   }
   const time_t d_period;
 
-  struct LockedObject {
+  struct LockedObject
+  {
     time_t d_last{0};
     uint32_t d_count{0};
   };
index bc1a02a19a31cb54cd9cafc3ba687861d04053de..5383528cc04bca8a3bd2e4b00f338df379332e20 100644 (file)
@@ -919,7 +919,7 @@ static void checkOrFixLinuxMapCountLimits([[maybe_unused]] Logr::log_t log)
     auto workers = RecThreadInfo::numTCPWorkers() + RecThreadInfo::numUDPWorkers() + 2;
     auto mapsNeeded = 4ULL * g_maxMThreads * workers;
     if (lim < mapsNeeded) {
-      g_maxMThreads = lim / (4 * workers);
+      g_maxMThreads = static_cast<unsigned int>(lim / (4ULL * workers));
       SLOG(g_log << Logger::Error << "sysctl vm.max_map_count= <" << mapsNeeded << ", this may cause 'bad_alloc' exceptions; adjusting max-mthreads to " << g_maxMThreads << endl,
            log->info(Logr::Error, "sysctl vm.max_map_count < mapsNeeded, this may cause 'bad_alloc' exceptions, adjusting max-mthreads",
                      "kern.max_map_count", Logging::Loggable(lim), "mapsNeeded", Logging::Loggable(mapsNeeded),