From: Otto Moerbeek Date: Tue, 6 Sep 2022 09:22:02 +0000 (+0200) Subject: Reformat X-Git-Tag: rec-4.9.0-alpha0~16^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b98b553aea7f2bbea35445f2a5b2b0a8d8db9c7d;p=thirdparty%2Fpdns.git Reformat --- diff --git a/pdns/fstrm_logger.hh b/pdns/fstrm_logger.hh index 2b1d69036b..c2187602a3 100644 --- a/pdns/fstrm_logger.hh +++ b/pdns/fstrm_logger.hh @@ -58,8 +58,8 @@ public: { return Stats{.d_queued = d_framesSent, .d_pipeFull = d_queueFullDrops, - .d_otherError = d_permanentFailures, - .d_tooLarge = 0 + .d_tooLarge = 0, + .d_otherError = d_permanentFailures }; } diff --git a/pdns/rec_channel_rec.cc b/pdns/rec_channel_rec.cc index 942a2b9dfe..e4d9d7e5ea 100644 --- a/pdns/rec_channel_rec.cc +++ b/pdns/rec_channel_rec.cc @@ -993,7 +993,7 @@ static void remoteLoggerStats(const string& type, const RemoteLoggerStats_t& sta if (stats.empty()) { return; } - for (const auto& [key, entry]: stats) { + for (const auto& [key, entry] : stats) { os << entry.d_queued << '\t' << entry.d_pipeFull << '\t' << entry.d_tooLarge << '\t' << entry.d_otherError << '\t' << key << '\t' << type << endl; } } @@ -1268,7 +1268,7 @@ static StatsMap toRemoteLoggerStatsMap(const string& name) auto stats2 = broadcastAccFunction(pleaseGetOutgoingRemoteLoggerStats); auto stats3 = broadcastAccFunction(pleaseGetFramestreamLoggerStats); uint64_t count = 0; - for (const auto& [stats, type] : { make_pair(stats1, "protobuf") , make_pair(stats2, "outgoingProtobuf"), make_pair(stats3, "dnstapFrameStream") } ) { + for (const auto& [stats, type] : {make_pair(stats1, "protobuf"), make_pair(stats2, "outgoingProtobuf"), make_pair(stats3, "dnstapFrameStream")}) { for (const auto& [key, entry] : stats) { auto keyname = pbasename + "{address=\"" + key + "\",type=\"" + type + "\",count=\""; auto sname1 = name + "-q-" + std::to_string(count); @@ -2347,7 +2347,7 @@ RecursorControlChannel::Answer RecursorControlParser::getAnswer(int s, const str return {0, doGetProxyMappingStats()}; } if (cmd == "get-remotelogger-stats") { - return {0, getRemoteLoggerStats() }; + return {0, getRemoteLoggerStats()}; } return {1, "Unknown command '" + cmd + "', try 'help'\n"}; diff --git a/pdns/recursordist/rec-main.cc b/pdns/recursordist/rec-main.cc index 1b41bbfa0c..741db6c5ad 100644 --- a/pdns/recursordist/rec-main.cc +++ b/pdns/recursordist/rec-main.cc @@ -1294,7 +1294,7 @@ static ProxyMappingStats_t& operator+=(ProxyMappingStats_t& a, const ProxyMappin return a; } -static RemoteLoggerStats_t& operator+=(RemoteLoggerStats_t &a, const RemoteLoggerStats_t& b) +static RemoteLoggerStats_t& operator+=(RemoteLoggerStats_t& a, const RemoteLoggerStats_t& b) { for (const auto& [key, entry] : b) { a[key] += entry; diff --git a/pdns/recursordist/rec-main.hh b/pdns/recursordist/rec-main.hh index 59ead71291..fe5ce18d65 100644 --- a/pdns/recursordist/rec-main.hh +++ b/pdns/recursordist/rec-main.hh @@ -190,7 +190,6 @@ extern thread_local std::unique_ptr t_packetCache; using RemoteLoggerStats_t = std::unordered_map; - extern bool g_logCommonErrors; extern size_t g_proxyProtocolMaximumSize; extern std::atomic g_quiet;