summaryrefslogtreecommitdiff
path: root/ACE/examples/Reactor/Misc/pingpong.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ACE/examples/Reactor/Misc/pingpong.cpp')
-rw-r--r--ACE/examples/Reactor/Misc/pingpong.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/ACE/examples/Reactor/Misc/pingpong.cpp b/ACE/examples/Reactor/Misc/pingpong.cpp
index bf36caf99b0..9a7a8566eae 100644
--- a/ACE/examples/Reactor/Misc/pingpong.cpp
+++ b/ACE/examples/Reactor/Misc/pingpong.cpp
@@ -80,10 +80,8 @@ Ping_Pong::Ping_Pong (char b[], ACE_HANDLE f)
pid_ (ACE_OS::getpid ()),
handle_ (f)
{
- int *pi_buf = (int *) this->buf_;
- *(pi_buf) = (int) this->pid_;
- pi_buf = (int *) (this->buf_ + sizeof (int));
- *(pi_buf) = 0;
+ *((int *) this->buf_) = (int) this->pid_;
+ *((int *) (this->buf_ + sizeof (int))) = 0;
ACE_OS::strcpy (this->buf_ + (2 * sizeof (int)), b);
this->buf_[this->buflen_ - 1] = '\n';
this->buf_[this->buflen_] = '\0';