diff options
author | Nick Williams <nicholas.williams@zaxiom.com> | 2020-08-28 08:17:03 -0500 |
---|---|---|
committer | Nick Williams <nicholas.williams@zaxiom.com> | 2020-08-28 08:17:03 -0500 |
commit | b1423339b2e5b4d7daa06d909e70bd81ae2f17ed (patch) | |
tree | 857dec499a9568aa8fed1d911d49fda5e2f91d8e /TAO/tao | |
parent | c5dae3839b9e056e6c91edc7684777a4b91c2baa (diff) | |
download | ATCD-b1423339b2e5b4d7daa06d909e70bd81ae2f17ed.tar.gz |
Another update for pull request comments
Diffstat (limited to 'TAO/tao')
-rw-r--r-- | TAO/tao/IIOP_Acceptor.cpp | 7 | ||||
-rw-r--r-- | TAO/tao/Strategies/DIOP_Acceptor.cpp | 9 |
2 files changed, 5 insertions, 11 deletions
diff --git a/TAO/tao/IIOP_Acceptor.cpp b/TAO/tao/IIOP_Acceptor.cpp index 3e5dd1f6c97..32c36373b17 100644 --- a/TAO/tao/IIOP_Acceptor.cpp +++ b/TAO/tao/IIOP_Acceptor.cpp @@ -478,11 +478,8 @@ TAO_IIOP_Acceptor::open_i (const ACE_INET_Addr& addr, ACE_INET_Addr a(addr); bool found_a_port = false; - ACE_UINT32 last_port = requested_port + this->port_span_ - 1; - if (last_port > ACE_MAX_DEFAULT_PORT) - { - last_port = ACE_MAX_DEFAULT_PORT; - } + ACE_UINT32 const last_port = ACE_MIN (requested_port + this->port_span_ - 1, + ACE_MAX_DEFAULT_PORT); for (ACE_UINT32 p = requested_port; p <= last_port; p++) { diff --git a/TAO/tao/Strategies/DIOP_Acceptor.cpp b/TAO/tao/Strategies/DIOP_Acceptor.cpp index 6bc6a5d1269..89717e05193 100644 --- a/TAO/tao/Strategies/DIOP_Acceptor.cpp +++ b/TAO/tao/Strategies/DIOP_Acceptor.cpp @@ -395,11 +395,8 @@ TAO_DIOP_Acceptor::open_i (const ACE_INET_Addr& addr, ACE_Reactor *reactor) { unsigned short const requested_port = addr.get_port_number (); - ACE_UINT32 last_port = requested_port + this->port_span_ - 1; - if (last_port > ACE_MAX_DEFAULT_PORT) - { - last_port = ACE_MAX_DEFAULT_PORT; - } + ACE_UINT32 const last_port = ACE_MIN (requested_port + this->port_span_ - 1, + ACE_MAX_DEFAULT_PORT); ACE_INET_Addr a(addr); bool found_a_port = false; @@ -1073,7 +1070,7 @@ TAO_DIOP_Acceptor::parse_options (const char *str) } else if (name == "portspan") { - int range = static_cast <int> (ACE_OS::atoi (value.c_str ())); + int const range = ACE_OS::atoi (value.c_str ()); // @@ What's the lower bound on the range? zero, or one? if (range < 1 || range > ACE_MAX_DEFAULT_PORT) TAOLIB_ERROR_RETURN ((LM_ERROR, |