diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2021-10-23 14:21:33 +0200 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2021-10-23 14:21:33 +0200 |
commit | 574d630763362f20d6890401293ad13b6c948847 (patch) | |
tree | 4822ada42947a4de7e506b6f9cfc76c1701ad5d8 /ACE/ace | |
parent | fbfe8923ae50012d510b2c936e4ea8482ed252f2 (diff) | |
download | ATCD-574d630763362f20d6890401293ad13b6c948847.tar.gz |
Minor cleanup
* ACE/ace/SPIPE_Addr.cpp:
* ACE/ace/SPIPE_Addr.inl:
* ACE/ace/Sig_Adapter.cpp:
* ACE/ace/Sig_Adapter.h:
* ACE/ace/WFMO_Reactor.cpp:
* ACE/ace/WFMO_Reactor.inl:
Diffstat (limited to 'ACE/ace')
-rw-r--r-- | ACE/ace/SPIPE_Addr.cpp | 6 | ||||
-rw-r--r-- | ACE/ace/SPIPE_Addr.inl | 5 | ||||
-rw-r--r-- | ACE/ace/Sig_Adapter.cpp | 1 | ||||
-rw-r--r-- | ACE/ace/Sig_Adapter.h | 4 | ||||
-rw-r--r-- | ACE/ace/WFMO_Reactor.cpp | 22 | ||||
-rw-r--r-- | ACE/ace/WFMO_Reactor.inl | 4 |
6 files changed, 15 insertions, 27 deletions
diff --git a/ACE/ace/SPIPE_Addr.cpp b/ACE/ace/SPIPE_Addr.cpp index 81240d557eb..e0c6e681cf9 100644 --- a/ACE/ace/SPIPE_Addr.cpp +++ b/ACE/ace/SPIPE_Addr.cpp @@ -27,16 +27,13 @@ ACE_SPIPE_Addr::set_addr (const void *addr, int len) } // Return the address. - void * ACE_SPIPE_Addr::get_addr () const { return (void *) &this->SPIPE_addr_; } - // Do nothing constructor. - ACE_SPIPE_Addr::ACE_SPIPE_Addr () : ACE_Addr (AF_SPIPE, sizeof this->SPIPE_addr_) { @@ -55,7 +52,6 @@ ACE_SPIPE_Addr::addr_to_string (ACE_TCHAR *s, size_t len) const } // Transform the string into the current addressing format. - int ACE_SPIPE_Addr::string_to_addr (const ACE_TCHAR *addr) { @@ -79,7 +75,6 @@ ACE_SPIPE_Addr::set (const ACE_SPIPE_Addr &sa) } // Copy constructor. - ACE_SPIPE_Addr::ACE_SPIPE_Addr (const ACE_SPIPE_Addr &sa) : ACE_Addr (AF_SPIPE, sizeof this->SPIPE_addr_) { @@ -147,7 +142,6 @@ ACE_SPIPE_Addr::set (const ACE_TCHAR *addr, } // Create a ACE_Addr from a ACE_SPIPE pathname. - ACE_SPIPE_Addr::ACE_SPIPE_Addr (const ACE_TCHAR *addr, gid_t gid, uid_t uid) diff --git a/ACE/ace/SPIPE_Addr.inl b/ACE/ace/SPIPE_Addr.inl index be00866dc80..d7bd7b4cfcc 100644 --- a/ACE/ace/SPIPE_Addr.inl +++ b/ACE/ace/SPIPE_Addr.inl @@ -1,6 +1,6 @@ // -*- C++ -*- -#include "ace/SString.h" +#include <cstring> ACE_BEGIN_VERSIONED_NAMESPACE_DECL @@ -8,8 +8,7 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE bool ACE_SPIPE_Addr::operator == (const ACE_SPIPE_Addr &sap) const { - return ACE_OS::strcmp (this->SPIPE_addr_.rendezvous_, - sap.SPIPE_addr_.rendezvous_) == 0; + return std::strcmp (this->SPIPE_addr_.rendezvous_, sap.SPIPE_addr_.rendezvous_) == 0; } // Compare two addresses for inequality. diff --git a/ACE/ace/Sig_Adapter.cpp b/ACE/ace/Sig_Adapter.cpp index bdfac71f7d2..456939a0702 100644 --- a/ACE/ace/Sig_Adapter.cpp +++ b/ACE/ace/Sig_Adapter.cpp @@ -53,7 +53,6 @@ ACE_Sig_Adapter::handle_signal (int signum, siginfo_t *siginfo, ucontext_t *ucon { // We have to dispatch a handler that was registered by a // third-party library. - ACE_Sig_Action old_disp; // Make sure this handler executes in the context it was diff --git a/ACE/ace/Sig_Adapter.h b/ACE/ace/Sig_Adapter.h index 16a0f9af960..09829bacb5f 100644 --- a/ACE/ace/Sig_Adapter.h +++ b/ACE/ace/Sig_Adapter.h @@ -36,14 +36,14 @@ public: ACE_Sig_Adapter (ACE_Sig_Action &, int sigkey); ACE_Sig_Adapter (ACE_Event_Handler *, int sigkey); ACE_Sig_Adapter (ACE_Sig_Handler_Ex, int sigkey = 0); - ~ACE_Sig_Adapter (void); + ~ACE_Sig_Adapter () override; /// Returns this signal key that's used to remove this from the /// ACE_Reactor's internal table. int sigkey (); /// Called by the ACE_Reactor to dispatch the signal handler. - virtual int handle_signal (int, siginfo_t *, ucontext_t *); + int handle_signal (int, siginfo_t *, ucontext_t *) override; ACE_ALLOC_HOOK_DECLARE; diff --git a/ACE/ace/WFMO_Reactor.cpp b/ACE/ace/WFMO_Reactor.cpp index 2a149c5a764..f5d7943bab4 100644 --- a/ACE/ace/WFMO_Reactor.cpp +++ b/ACE/ace/WFMO_Reactor.cpp @@ -1621,14 +1621,13 @@ ACE_WFMO_Reactor_Handler_Repository::handler (ACE_HANDLE handle, ACE_Event_Handler **user_event_handler) { long existing_masks = 0; - int found = 0; + bool found = false; ACE_Event_Handler_var safe_event_handler = - this->handler (handle, - existing_masks); + this->handler (handle, existing_masks); if (safe_event_handler.handler ()) - found = 1; + found = true; if (!found) return -1; @@ -1639,37 +1638,36 @@ ACE_WFMO_Reactor_Handler_Repository::handler (ACE_HANDLE handle, ACE_BIT_ENABLED (user_masks, ACE_Event_Handler::READ_MASK)) if (!ACE_BIT_ENABLED (existing_masks, FD_READ) && !ACE_BIT_ENABLED (existing_masks, FD_CLOSE)) - found = 0; + found = false; if (found && ACE_BIT_ENABLED (user_masks, ACE_Event_Handler::WRITE_MASK)) if (!ACE_BIT_ENABLED (existing_masks, FD_WRITE)) - found = 0; + found = false; if (found && ACE_BIT_ENABLED (user_masks, ACE_Event_Handler::EXCEPT_MASK)) if (!ACE_BIT_ENABLED (existing_masks, FD_OOB)) - found = 0; + found = false; if (found && ACE_BIT_ENABLED (user_masks, ACE_Event_Handler::ACCEPT_MASK)) if (!ACE_BIT_ENABLED (existing_masks, FD_ACCEPT)) - found = 0; + found = false; if (found && ACE_BIT_ENABLED (user_masks, ACE_Event_Handler::CONNECT_MASK)) if (!ACE_BIT_ENABLED (existing_masks, FD_CONNECT)) - found = 0; + found = false; if (found && ACE_BIT_ENABLED (user_masks, ACE_Event_Handler::QOS_MASK)) if (!ACE_BIT_ENABLED (existing_masks, FD_QOS)) - found = 0; - + found = 0false if (found && ACE_BIT_ENABLED (user_masks, ACE_Event_Handler::GROUP_QOS_MASK)) if (!ACE_BIT_ENABLED (existing_masks, FD_GROUP_QOS)) - found = 0; + found = false; if (found && user_event_handler) diff --git a/ACE/ace/WFMO_Reactor.inl b/ACE/ace/WFMO_Reactor.inl index e34e594da37..5d1993b77a2 100644 --- a/ACE/ace/WFMO_Reactor.inl +++ b/ACE/ace/WFMO_Reactor.inl @@ -1151,9 +1151,7 @@ ACE_WFMO_Reactor::handler (ACE_HANDLE handle, { ACE_GUARD_RETURN (ACE_Process_Mutex, ace_mon, this->lock_, -1); - return this->handler_rep_.handler (handle, - mask, - event_handler); + return this->handler_rep_.handler (handle, mask, event_handler); } ACE_INLINE bool |