summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1996-12-23 14:32:49 +0000
committerlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1996-12-23 14:32:49 +0000
commitaac89a3b764fa39bbd379f2d966070ab68059ec3 (patch)
tree937c69e88055e0e30eb020fd0ea75d0691fe05c3
parent1331b8766fd86a31135964cf6d1c81fb3e537993 (diff)
downloadATCD-aac89a3b764fa39bbd379f2d966070ab68059ec3.tar.gz
replaced two "ptr && ptr->foo ()" statements with "if (ptr) ptr-> foo()" to prevent compiler warnings about unused computed values
-rw-r--r--ace/Acceptor.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/ace/Acceptor.cpp b/ace/Acceptor.cpp
index 79ad80fd9ae..10cd3306258 100644
--- a/ace/Acceptor.cpp
+++ b/ace/Acceptor.cpp
@@ -709,8 +709,9 @@ ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::handle_close (ACE_HANDLE
// Note that if we aren't actually registered with the
// ACE_Reactor then it's ok for this call to fail...
- this->reactor () && this->reactor ()->remove_handler
- (this, ACE_Event_Handler::READ_MASK | ACE_Event_Handler::DONT_CALL);
+ if (this->reactor ())
+ this->reactor ()->remove_handler
+ (this, ACE_Event_Handler::READ_MASK | ACE_Event_Handler::DONT_CALL);
if (this->peer_acceptor_.close () == -1)
ACE_ERROR ((LM_ERROR, "close\n"));
@@ -729,8 +730,8 @@ ACE_Oneshot_Acceptor<SVC_HANDLER, ACE_PEER_ACCEPTOR_2>::handle_timeout
// Since we aren't necessarily registered with the Reactor, don't
// bother to check the return value here...
- this->reactor () && this->reactor ()->remove_handler
- (this, ACE_Event_Handler::READ_MASK);
+ if (this->reactor ())
+ this->reactor ()->remove_handler (this, ACE_Event_Handler::READ_MASK);
return 0;
}