]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Apply suggestions from code review
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Thu, 22 Jan 2026 08:30:40 +0000 (09:30 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Thu, 22 Jan 2026 08:33:43 +0000 (09:33 +0100)
Co-authored-by: Miod Vallat <miod.vallat@powerdns.com>
Signed-off-by: Otto Moerbeek <otto.moerbeek@open-xchange.com>
pdns/dnsname.hh
pdns/recursordist/docs/http-api/endpoint-ottraceconditions.rst
pdns/recursordist/rec_channel_rec.cc
pdns/recursordist/ws-recursor.cc

index db78e2866167d0bf6820ced8bfd4bef00247c0e1..2dd3cec651316d60a7c84bab265cfd3b128c7212 100644 (file)
@@ -728,6 +728,7 @@ struct SuffixMatchNode
   std::vector<DNSName> toVector() const
     {
       std::vector<DNSName> ret;
+      ret.reserve(d_nodes.size());
       for (const auto& n : d_nodes) {
         ret.emplace_back(n);
       }
index 3a0f95d03e4c102636757b6475bc273eb8c3962b..44557e4b14d00fd8ff79604073d1082cbbe35a95 100644 (file)
@@ -7,7 +7,7 @@ OpenTelemetryTraceConditions endpoint
 
 .. http:get:: /api/v1/servers/:server_id/ottraceconditions
 
-  Get all :json:object:`OpenTelemetryTraceCondition` from the server. Note that while the settings file allows a list of subnets to be associated with a condition, this list is flattened: one subnet per condition.
+  Get all :json:object:`OpenTelemetryTraceCondition` from the server. Note that while the settings file allows a list of subnets to be associated with a condition, this list will be flattened, with only one subnet per condition.
 
   :query server_id: The name of the server
 
index 906a7c766be23ae902521648a88e89e44baea970..6348c931eaa99cd50655f2532a1cf3a43f48b5df 100644 (file)
@@ -1990,7 +1990,7 @@ static void* pleaseSupplantOTConditions(const OpenTelemetryTraceConditions& cond
 
 void updateOTConditions(const OpenTelemetryTraceConditions& conditions)
 {
-  // XXX YAML settiongs are not updated, so rec_control get-parameter won't show runtime updated conditions
+  // XXX YAML settings are not updated, so rec_control get-parameter won't show runtime updated conditions
   broadcastFunction([conditions] { return pleaseSupplantOTConditions(conditions); });
 }
 
index 1f254017055cfd1903e861de71cfc09a897021ca..ba9e3c4cc84a28ff24b6e0af41e4ea1822393c53 100644 (file)
@@ -644,7 +644,7 @@ static void apiServerOTConditionDetailDELETE(HttpRequest* req, HttpResponse* res
     }
     throw ApiException("Could not find otcondition '" + netmask.toString() + "'");
   }
-  catch (NetmaskException& ex) {
+  catch (NetmaskException&) {
     throw ApiException("Could not parse netmask");
   }
 }