summaryrefslogtreecommitdiff
path: root/TAO/tao/IIOP_Profile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/IIOP_Profile.cpp')
-rw-r--r--TAO/tao/IIOP_Profile.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/TAO/tao/IIOP_Profile.cpp b/TAO/tao/IIOP_Profile.cpp
index c4f0505a693..fee07e0b832 100644
--- a/TAO/tao/IIOP_Profile.cpp
+++ b/TAO/tao/IIOP_Profile.cpp
@@ -10,6 +10,7 @@
#include "tao/SystemException.h"
#include "ace/OS_NS_string.h"
#include "ace/OS_NS_stdio.h"
+#include "ace/Truncate.h"
#include "ace/os_include/os_netdb.h"
static const char the_prefix[] = "iiop";
@@ -210,7 +211,7 @@ TAO_IIOP_Profile::parse_string_i (const char *ior)
else if (cp_pos != 0)
{
// A port number or port name was specified.
- CORBA::ULong length_port = okd - cp_pos - 1;
+ CORBA::ULong length_port = ACE_Utils::truncate_cast<CORBA::ULong> (okd - cp_pos - 1);
CORBA::String_var tmp = CORBA::string_alloc (length_port);
if (tmp.in() != 0)
@@ -245,10 +246,10 @@ TAO_IIOP_Profile::parse_string_i (const char *ior)
this->endpoint_.port_ = ia.get_port_number ();
}
}
- length_host = cp_pos - ior;
+ length_host = ACE_Utils::truncate_cast<CORBA::ULong> (cp_pos - ior);
}
else
- length_host = okd - ior;
+ length_host = ACE_Utils::truncate_cast<CORBA::ULong> (okd - ior);
#if defined (ACE_HAS_IPV6)
if (ipv6_in_host)