From: Charles-Henri Bruyand Date: Thu, 2 Jun 2022 14:59:51 +0000 (+0200) Subject: try to appease the spell checker AND the code format checker :) X-Git-Tag: auth-4.8.0-alpha0~79^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F11674%2Fhead;p=thirdparty%2Fpdns.git try to appease the spell checker AND the code format checker :) --- diff --git a/.github/actions/spell-check/expect.txt b/.github/actions/spell-check/expect.txt index 914d0b2512..73d7e40a86 100644 --- a/.github/actions/spell-check/expect.txt +++ b/.github/actions/spell-check/expect.txt @@ -303,6 +303,7 @@ csync ctime ctor ctx +custommetrics cve cvename cvs diff --git a/pdns/dnsdist-lua.cc b/pdns/dnsdist-lua.cc index 9ccec6a624..d1ec7dca2f 100644 --- a/pdns/dnsdist-lua.cc +++ b/pdns/dnsdist-lua.cc @@ -2879,13 +2879,15 @@ static void setupLuaConfig(LuaContext& luaCtx, bool client, bool configCheck) g_stats.entries.emplace_back(name, &g_stats.customCounters[name]); addMetricDefinition(name, "counter", description); } - } else if (type == "gauge") { + } + else if (type == "gauge") { auto itp = g_stats.customGauges.emplace(name, 0.); if (itp.second) { g_stats.entries.emplace_back(name, &g_stats.customGauges[name]); addMetricDefinition(name, "gauge", description); } - } else { + } + else { g_outputBuffer = "declareMetric unknown type '" + type + "'\n"; errlog("Unable to declareMetric '%s': no such type '%s'", name, type); return false; @@ -2924,7 +2926,8 @@ static void setupLuaConfig(LuaContext& luaCtx, bool client, bool configCheck) auto counter = g_stats.customCounters.find(name); if (counter != g_stats.customCounters.end()) { return (double)counter->second.load(); - } else { + } + else { auto gauge = g_stats.customGauges.find(name); if (gauge != g_stats.customGauges.end()) { return gauge->second.load();