summaryrefslogtreecommitdiff
path: root/ace/Message_Block.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ace/Message_Block.cpp')
-rw-r--r--ace/Message_Block.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/ace/Message_Block.cpp b/ace/Message_Block.cpp
index d4b3bb11891..5a2f29d4af6 100644
--- a/ace/Message_Block.cpp
+++ b/ace/Message_Block.cpp
@@ -75,11 +75,9 @@ ACE_Message_Block::copy (const char *buf, size_t n)
{
ACE_TRACE ("ACE_Message_Block::copy");
- /*size_t len = ACE_static_cast(size_t,
- this->end () - this->wr_ptr ());*/
- // Note that for this to work correct, end () *must* be >= mark ().
- size_t len = this->space ();
-
+ // Note that for this to work correct, end() *must* be >= wr_ptr().
+ size_t len = ACE_static_cast(size_t,
+ this->end () - this->wr_ptr ());
if (len < n)
return -1;
else
@@ -97,11 +95,9 @@ ACE_Message_Block::copy (const char *buf)
{
ACE_TRACE ("ACE_Message_Block::copy");
- /* size_t len = ACE_static_cast(size_t,
- (this->end () - this->wr_ptr ())); */
// Note that for this to work correct, end() *must* be >= wr_ptr().
- size_t len = this->space ();
-
+ size_t len = ACE_static_cast(size_t,
+ (this->end () - this->wr_ptr ()));
size_t buflen = ACE_OS::strlen (buf) + 1;
if (len < buflen)