summaryrefslogtreecommitdiff
path: root/examples/Logger
diff options
context:
space:
mode:
Diffstat (limited to 'examples/Logger')
-rw-r--r--examples/Logger/Acceptor-server/server_loggerd.cpp4
-rw-r--r--examples/Logger/simple-server/Logging_Handler.cpp3
2 files changed, 5 insertions, 2 deletions
diff --git a/examples/Logger/Acceptor-server/server_loggerd.cpp b/examples/Logger/Acceptor-server/server_loggerd.cpp
index 2ae054cb445..8300e11a965 100644
--- a/examples/Logger/Acceptor-server/server_loggerd.cpp
+++ b/examples/Logger/Acceptor-server/server_loggerd.cpp
@@ -160,7 +160,9 @@ Logging_Handler::handle_input (ACE_HANDLE)
ACE_Log_Record lp;
len = ntohl (len);
- if ((n = this->peer ().recv_n ((void *) &lp, len)) != len)
+ n = this->peer ().recv_n ((void *) &lp, len);
+
+ if (n != len)
ACE_ERROR_RETURN ((LM_ERROR, "(%P|%t) %p at host %s\n",
"client logger", this->peer_name_), -1);
/* NOTREACHED */
diff --git a/examples/Logger/simple-server/Logging_Handler.cpp b/examples/Logger/simple-server/Logging_Handler.cpp
index 596f7974885..005e4cf2fc3 100644
--- a/examples/Logger/simple-server/Logging_Handler.cpp
+++ b/examples/Logger/simple-server/Logging_Handler.cpp
@@ -62,7 +62,8 @@ Logging_Handler::handle_input (ACE_HANDLE)
ACE_Log_Record lp;
len = ntohl (len);
- if ((n = this->cli_stream_.recv_n ((void *) &lp, len)) != len)
+ n = this->cli_stream_.recv_n ((void *) &lp, len);
+ if (n != len)
ACE_ERROR_RETURN ((LM_ERROR, "(%P|%t) %p at host %s\n",
"client logger", this->host_name_), -1);
/* NOTREACHED */