You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by "cmcfarlen (via GitHub)" <gi...@apache.org> on 2023/03/17 16:24:52 UTC

[GitHub] [trafficserver] cmcfarlen commented on a diff in pull request #9530: libswoc: Update to 1.4.6

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


##########
lib/swoc/src/swoc_ip.cc:
##########
@@ -1055,11 +1055,9 @@ IP6Range::load(std::string_view text) {
 
 IPRange::IPRange(IPAddr const &min, IPAddr const &max) {
   if (min.is_ip4() && max.is_ip4()) {
-    _range._ip4.assign(min.ip4(), max.ip4());
-    _family = AF_INET;
+    this->assign(min.ip4(), max.ip4());
   } else if (min.is_ip6() && max.is_ip6()) {
-    _range._ip6.assign(min.ip6(), max.ip6());
-    _family = AF_INET6;
+    this->assign(min.ip6(), max.ip6());
   }

Review Comment:
   I know this isn't part of these changes, but should there be some assert when the families are mismatched?



-- 
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: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org