]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
try to appease the spell checker AND the code format checker :) 11674/head
authorCharles-Henri Bruyand <charles-henri.bruyand@open-xchange.com>
Thu, 2 Jun 2022 14:59:51 +0000 (16:59 +0200)
committerCharles-Henri Bruyand <charles-henri.bruyand@open-xchange.com>
Thu, 2 Jun 2022 15:02:42 +0000 (17:02 +0200)
.github/actions/spell-check/expect.txt
pdns/dnsdist-lua.cc

index 914d0b2512e10cbbedc2052544bf70c28081fda1..73d7e40a86fb0f4160b4063f360ab434eb8751a8 100644 (file)
@@ -303,6 +303,7 @@ csync
 ctime
 ctor
 ctx
+custommetrics
 cve
 cvename
 cvs
index 9ccec6a624045b1ae583b7eae8a0712213f934a8..d1ec7dca2f246f8b36e04ab7132db30205c38997 100644 (file)
@@ -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();