cmcfarlen commented on code in PR #9951:
URL: https://github.com/apache/trafficserver/pull/9951#discussion_r1255404106


##########
iocore/net/YamlSNIConfig.cc:
##########
@@ -213,6 +213,38 @@ std::set<std::string> valid_sni_config_keys = {TS_fqdn,
 namespace YAML
 {
 template <> struct convert<YamlSNIConfig::Item> {
+  static ts::port_range_t
+  parse_single_inbound_port_range(Node const &node, swoc::TextView port_view)
+  {
+    auto min{port_view.split_prefix_at('-')};
+    if (!min) {
+      min = port_view;
+    }
+    auto const &max{port_view};
+
+    swoc::TextView parsed_min;
+    long min_port{swoc::svtoi(min, &parsed_min)};
+    swoc::TextView parsed_max;
+    long max_port{swoc::svtoi(max, &parsed_max)};

Review Comment:
   There are plenty of style guides that recommend `=` over uniform 
initialization for trivial initialization like this, especially with `auto` 
where narrowing conversions are not a concern.  Style-wise, in ATS, this is 
certainly the norm.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to