]> 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>
Tue, 21 May 2024 13:47:33 +0000 (15:47 +0200)
pdns/mplexer.hh
pdns/recursordist/ratelimitedlog.hh
pdns/recursordist/rec-main.cc

index cf3f3c5cdfbf2969faed803025df125a966d1009..13748fb59e4b35c4586e6cbe370772a4dce94ba0 100644 (file)
@@ -81,7 +81,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;
@@ -94,7 +95,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 cdd4c47798a0b4f49cbfd81179d6db4a7003d5e0..e553317bd7d1aaa9aad0586909e290f5fc1aa4f3 100644 (file)
@@ -946,7 +946,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),