From: Otto Moerbeek Date: Tue, 21 May 2024 09:50:04 +0000 (+0200) Subject: Reformt X-Git-Tag: rec-5.1.0-beta1~31^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2759618132061d8cc543c1f25ff29b5db1936392;p=thirdparty%2Fpdns.git Reformt --- diff --git a/pdns/mplexer.hh b/pdns/mplexer.hh index cf3f3c5cdf..13748fb59e 100644 --- a/pdns/mplexer.hh +++ b/pdns/mplexer.hh @@ -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; 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 cdd4c47798..e553317bd7 100644 --- a/pdns/recursordist/rec-main.cc +++ b/pdns/recursordist/rec-main.cc @@ -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(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),