From: Otto Moerbeek Date: Tue, 21 May 2024 09:50:04 +0000 (+0200) Subject: Reformt X-Git-Tag: rec-5.0.6~1^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cc65e4a2098f38c5eb072615f7b4384be710adb6;p=thirdparty%2Fpdns.git Reformt (cherry picked from commit 2759618132061d8cc543c1f25ff29b5db1936392) --- diff --git a/pdns/mplexer.hh b/pdns/mplexer.hh index 1ad2c379e2..6a84551ab9 100644 --- a/pdns/mplexer.hh +++ b/pdns/mplexer.hh @@ -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; diff --git a/pdns/recursordist/ratelimitedlog.hh b/pdns/recursordist/ratelimitedlog.hh index b84d39a705..c390ffa081 100644 --- a/pdns/recursordist/ratelimitedlog.hh +++ b/pdns/recursordist/ratelimitedlog.hh @@ -86,7 +86,8 @@ private: } const time_t d_period; - struct LockedObject { + struct LockedObject + { time_t d_last{0}; uint32_t d_count{0}; }; diff --git a/pdns/recursordist/rec-main.cc b/pdns/recursordist/rec-main.cc index bc1a02a19a..5383528cc0 100644 --- a/pdns/recursordist/rec-main.cc +++ b/pdns/recursordist/rec-main.cc @@ -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(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),